]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
with utf8 disabled, str2chr should now behave the way it used to
authorblub <blub@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Jan 2010 20:10:00 +0000 (20:10 +0000)
committerblub <blub@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Jan 2010 20:10:00 +0000 (20:10 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9793 d7cf8633-e32d-0410-b094-e92efae38249

prvm_cmds.c

index eb572503ac6fe02bbd30f916f8b57cd83e1888d9..7ec33eac63691b958d8916509a15fca5f4af3c77 100644 (file)
@@ -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