From 36512cf5263a0c05ad71223fa3497b1473f3a0dd Mon Sep 17 00:00:00 2001 From: div0 Date: Wed, 29 Apr 2009 19:10:55 +0000 Subject: [PATCH] yet another fteqcc bug workaround git-svn-id: svn://svn.icculus.org/nexuiz/trunk@6619 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/menu/item/inputbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/menu/item/inputbox.c b/data/qcsrc/menu/item/inputbox.c index 43484c567..552decfce 100644 --- a/data/qcsrc/menu/item/inputbox.c +++ b/data/qcsrc/menu/item/inputbox.c @@ -76,12 +76,15 @@ float mouseReleaseInputBox(entity me, vector pos) void enterTextInputBox(entity me, string ch) { float i; + string s1, s2; for(i = 0; i < strlen(ch); ++i) if(strstrofs(me.forbiddenCharacters, substring(ch, i, 1), 0) > -1) return; if(strlen(ch) + strlen(me.text) > me.maxLength) return; - me.setText(me, strcat(substring(me.text, 0, me.cursorPos), ch, substring(me.text, me.cursorPos, strlen(me.text) - me.cursorPos))); + s1 = substring(me.text, 0, me.cursorPos); + s2 = substring(me.text, me.cursorPos, strlen(me.text) - me.cursorPos); + me.setText(me, strcat(s1, ch, s2)); // fteqcc sucks me.cursorPos += strlen(ch); } -- 2.39.2