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.6.0~163^2~296 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=4691c4289b19b607d99c46b8a47ae82bb01c32b0 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 --- 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;