From: <z-...@us...> - 2007-12-17 10:08:53
|
Revision: 7423 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=7423&view=rev Author: z-man Date: 2007-12-17 02:08:57 -0800 (Mon, 17 Dec 2007) Log Message: ----------- Small performance fix: strlen -> strnlen. Want to do something useful today :) Modified Paths: -------------- armagetronad/branches/0.2.8/armagetronad/src/tools/tString.cpp Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 0f5b4d08-0226-0410-8d76-d6dd9a32ed7b:/local/armagetronad:10247 + 0f5b4d08-0226-0410-8d76-d6dd9a32ed7b:/local/armagetronad:10252 Modified: armagetronad/branches/0.2.8/armagetronad/src/tools/tString.cpp =================================================================== --- armagetronad/branches/0.2.8/armagetronad/src/tools/tString.cpp 2007-12-17 10:01:59 UTC (rev 7422) +++ armagetronad/branches/0.2.8/armagetronad/src/tools/tString.cpp 2007-12-17 10:08:57 UTC (rev 7423) @@ -1086,7 +1086,7 @@ while (*c!='\0'){ // skip color codes int len; - if (*c=='0' && (len = strlen(c))>=2 && c[1]=='x') + if (*c=='0' && (len = strnlen(c,8))>=2 && c[1]=='x') { if(len >= 8) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |