VC warning fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3465 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -105,7 +105,7 @@ int rendercommand(int x, int y, int w)
|
||||
int width, height;
|
||||
text_bounds(s, width, height, w);
|
||||
y -= height - FONTH;
|
||||
draw_text(s, x, y, 0xFF, 0xFF, 0xFF, 0xFF, cmdline.pos>=0 ? cmdline.pos+2 : strlen(s), w);
|
||||
draw_text(s, x, y, 0xFF, 0xFF, 0xFF, 0xFF, cmdline.pos>=0 ? cmdline.pos+2 : (int)strlen(s), w);
|
||||
return height;
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ const char *genpwdhash(const char *name, const char *pwd, int salt)
|
||||
static string temp;
|
||||
s_sprintf(temp)("%s %d %s %s %d", pwd, salt, name, pwd, PROTOCOL_VERSION);
|
||||
tiger::hashval hash;
|
||||
tiger::hash((uchar *)temp, strlen(temp), hash);
|
||||
tiger::hash((uchar *)temp, (int)strlen(temp), hash);
|
||||
s_sprintf(temp)("%llx %llx %llx", hash.chunks[0], hash.chunks[1], hash.chunks[2]);
|
||||
return temp;
|
||||
}
|
||||
|
||||
@@ -658,12 +658,12 @@ static cvector playerskinlist;
|
||||
const char *getclientskin(const char *name, const char *suf)
|
||||
{
|
||||
static string tmp;
|
||||
int suflen = strlen(suf), namelen = strlen(name);
|
||||
int suflen = (int)strlen(suf), namelen = (int)strlen(name);
|
||||
const char *s, *r = NULL;
|
||||
loopv(playerskinlist)
|
||||
{
|
||||
s = playerskinlist[i];
|
||||
int sl = strlen(s) - suflen;
|
||||
int sl = (int)strlen(s) - suflen;
|
||||
if(sl > 0 && !strcmp(s + sl, suf))
|
||||
{
|
||||
if(!strncmp(name, s, namelen)) return s; // exact match
|
||||
|
||||
@@ -2260,7 +2260,7 @@ void welcomepacket(ucharbuf &p, int n, ENetPacket *packet, bool forcedeath)
|
||||
{ \
|
||||
enet_packet_resize(packet, packet->dataLength + max(MAXTRANS, space - p.remaining())); \
|
||||
p.buf = packet->data; \
|
||||
p.maxlen = packet->dataLength; \
|
||||
p.maxlen = (int)packet->dataLength; \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -2369,7 +2369,7 @@ void welcomepacket(ucharbuf &p, int n, ENetPacket *packet, bool forcedeath)
|
||||
putint(p, autoteam ? 1 : 0);
|
||||
if(motd)
|
||||
{
|
||||
CHECKSPACE(5+2*strlen(motd)+1);
|
||||
CHECKSPACE(5+2*(int)strlen(motd)+1);
|
||||
putint(p, SV_TEXT);
|
||||
sendstring(motd, p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user