From 2c47b4bfe120d8a57ad55f5f7e03a7b15e19c730 Mon Sep 17 00:00:00 2001 From: vortex Date: Thu, 28 Jul 2011 10:20:57 +0000 Subject: [PATCH] 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 --- common.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.2