From 02d7fcc5c3668e2ff5df5838fba4074f66c37842 Mon Sep 17 00:00:00 2001 From: blub Date: Tue, 5 Jan 2010 20:10:00 +0000 Subject: [PATCH] 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 --- prvm_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2