From: blub Date: Tue, 5 Jan 2010 20:04:38 +0000 (+0000) Subject: with utf8 disabled VM_str2chr should not use U+E0xx codes X-Git-Tag: xonotic-v0.1.0preview~230^2~675 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=978845bb7423e76ff99b9dc98dbe93315b732338;p=xonotic%2Fdarkplaces.git with utf8 disabled VM_str2chr should not use U+E0xx codes git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9792 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/prvm_cmds.c b/prvm_cmds.c index 69db32ca..eb572503 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -5057,7 +5057,10 @@ void VM_str2chr (void) if((unsigned)index < strlen(s)) { - ch = u8_getchar_noendptr(s + index); + if (utf8_enable.integer) + ch = u8_getchar_noendptr(s + index); + else + ch = s[index]; PRVM_G_FLOAT(OFS_RETURN) = ch; } else