From 02d15ae94853a90661be3efc1c1c4496840885f1 Mon Sep 17 00:00:00 2001 From: blub Date: Fri, 25 Dec 2009 09:17:45 +0000 Subject: [PATCH] fix u8_COM_StringLengthNoColors the same way other functions handle signedness git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9686 d7cf8633-e32d-0410-b094-e92efae38249 --- utf8lib.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utf8lib.c b/utf8lib.c index b1749c12..6b2b985e 100644 --- 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; -- 2.39.2