From 7310ccc56ef9562bac8d52df25ed47b826c02a49 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 26 Feb 2010 20:32:24 +0000 Subject: [PATCH] fix strstrofs with unicode git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10015 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 bd6b426a..8a21e93c 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -5056,7 +5056,7 @@ void VM_strstrofs (void) if (!match) PRVM_G_FLOAT(OFS_RETURN) = -1; else - PRVM_G_FLOAT(OFS_RETURN) = match - instr; + PRVM_G_FLOAT(OFS_RETURN) = u8_strnlen(instr, match-instr); } //#222 string(string s, float index) str2chr (FTE_STRINGS) -- 2.39.2