]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix u8_COM_StringLengthNoColors the same way other functions handle signedness
authorblub <blub@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Dec 2009 09:17:45 +0000 (09:17 +0000)
committerblub <blub@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Dec 2009 09:17:45 +0000 (09:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9686 d7cf8633-e32d-0410-b094-e92efae38249

utf8lib.c

index b1749c128f2bd3b0f670916e377170ecf9755d20..6b2b985e0e441cb6801bee024f0549368dd4ad13 100644 (file)
--- a/utf8lib.c
+++ b/utf8lib.c
@@ -626,13 +626,14 @@ all characters until the zero terminator.
 size_t
 COM_StringLengthNoColors(const char *s, size_t size_s, qboolean *valid);
 size_t
-u8_COM_StringLengthNoColors(const char *s, size_t size_s, qboolean *valid)
+u8_COM_StringLengthNoColors(const char *_s, size_t size_s, qboolean *valid)
 {
-       const char *end;
+       const unsigned char *s = (const unsigned char*)_s;
+       const unsigned char *end;
        size_t len = 0;
 
        if (!utf8_enable.integer)
-               return COM_StringLengthNoColors(s, size_s, valid);
+               return COM_StringLengthNoColors(_s, size_s, valid);
 
        end = size_s ? (s + size_s) : NULL;