From: blub Date: Tue, 5 Jan 2010 20:10:00 +0000 (+0000) Subject: with utf8 disabled, str2chr should now behave the way it used to X-Git-Tag: xonotic-v0.1.0preview~860 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=66ca697cb298f75d40c9fabbcc0e79c4225fc737;p=xonotic%2Fdarkplaces.git with utf8 disabled, str2chr should now behave the way it used to git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9793 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=02d7fcc5c3668e2ff5df5838fba4074f66c37842 --- diff --git a/prvm_cmds.c b/prvm_cmds.c index eb572503..7ec33eac 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -5060,7 +5060,7 @@ void VM_str2chr (void) if (utf8_enable.integer) ch = u8_getchar_noendptr(s + index); else - ch = s[index]; + ch = (unsigned char)s[(unsigned)PRVM_G_FLOAT(OFS_PARM1)]; PRVM_G_FLOAT(OFS_RETURN) = ch; } else