From 37cc8978829685076fb93cb32d478d1829e61645 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Tue, 7 Aug 2007 11:58:38 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1199 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/rendertext.cpp | 2 +- source/src/server.cpp | 2 +- source/src/tools.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/rendertext.cpp b/source/src/rendertext.cpp index fd806576..2fdc232c 100644 --- a/source/src/rendertext.cpp +++ b/source/src/rendertext.cpp @@ -134,7 +134,7 @@ void text_block(const char *str, int max, vector &lines) { if(!str) return; int visible; - while((visible = max ? text_visible(str, max) : strlen(str))) + while((visible = max ? text_visible(str, max) : (int)strlen(str))) { const char *newline = (const char *)memchr(str, '\n', visible); if(newline) visible = newline+1-str; diff --git a/source/src/server.cpp b/source/src/server.cpp index 0e0afcd4..2f532d37 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -832,7 +832,7 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1 #define QUEUE_MSG { if(cl->type==ST_TCPIP) while(curmsgmessages.add(p.buf[curmsg++]); } #define QUEUE_INT(n) { if(cl->type==ST_TCPIP) { curmsg = p.length(); ucharbuf buf = cl->messages.reserve(5); putint(buf, n); cl->messages.addbuf(buf); } } - #define QUEUE_STR(text) { if(cl->type==ST_TCPIP) { curmsg = p.length(); ucharbuf buf = cl->messages.reserve(2*strlen(text)+1); sendstring(text, buf); cl->messages.addbuf(buf); } } + #define QUEUE_STR(text) { if(cl->type==ST_TCPIP) { curmsg = p.length(); ucharbuf buf = cl->messages.reserve(2*(int)strlen(text)+1); sendstring(text, buf); cl->messages.addbuf(buf); } } int curmsg; while((curmsg = p.length()) < p.maxlen) switch(type = checktype(getint(p), cl)) diff --git a/source/src/tools.cpp b/source/src/tools.cpp index 67d2c722..edc6017c 100644 --- a/source/src/tools.cpp +++ b/source/src/tools.cpp @@ -61,7 +61,7 @@ bool fileexists(const char *path, const char *mode) bool createdir(const char *path) { - int len = strlen(path); + size_t len = strlen(path); if(path[len-1]==PATHDIV) { static string strip; @@ -77,7 +77,7 @@ bool createdir(const char *path) static void fixdir(char *dir) { path(dir); - int len = strlen(dir); + size_t len = strlen(dir); if(dir[len-1]!=PATHDIV) { dir[len] = PATHDIV;