From: vortex Date: Thu, 28 Jul 2011 10:20:57 +0000 (+0000) Subject: Quick fix on COM_ToLowerString/COM_ToUpperString to let them work right on null UTF8... X-Git-Tag: xonotic-v0.5.0~65 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2c47b4bfe120d8a57ad55f5f7e03a7b15e19c730;p=xonotic%2Fdarkplaces.git Quick fix on COM_ToLowerString/COM_ToUpperString to let them work right on null UTF8 strings. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11256 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=4691c4289b19b607d99c46b8a47ae82bb01c32b0 --- diff --git a/common.c b/common.c index 69a7a5d8..d939a020 100644 --- a/common.c +++ b/common.c @@ -1693,6 +1693,7 @@ void COM_ToLowerString (const char *in, char *out, size_t size_out) if(utf8_enable.integer) { + *out = 0; while(*in && size_out > 1) { int n; @@ -1725,6 +1726,7 @@ void COM_ToUpperString (const char *in, char *out, size_t size_out) if(utf8_enable.integer) { + *out = 0; while(*in && size_out > 1) { int n;