diff --git a/source/src/console.cpp b/source/src/console.cpp index 5e23f918..54b99f9a 100644 --- a/source/src/console.cpp +++ b/source/src/console.cpp @@ -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; } diff --git a/source/src/protocol.cpp b/source/src/protocol.cpp index b419c4a5..69459f39 100644 --- a/source/src/protocol.cpp +++ b/source/src/protocol.cpp @@ -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; } diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 16507333..92f39cf1 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -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 diff --git a/source/src/server.cpp b/source/src/server.cpp index 75918437..7a54f2ba 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -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); }