hedgewars/uInputHandler.pas
changeset 7202 2d78dc517c91
parent 7199 f329fbf1ffb4
child 7231 f484455dd055
child 7403 e8d0b21efa82
--- a/hedgewars/uInputHandler.pas	Fri Jun 08 23:56:08 2012 +0400
+++ b/hedgewars/uInputHandler.pas	Sat Jun 09 12:15:05 2012 +0200
@@ -84,12 +84,12 @@
 procedure MaskModifier(Modifier: shortstring; var code: LongInt);
 var mod_ : shortstring;
     ModifierCount, i: LongInt;
-    c : char;
 begin
 if Modifier = '' then exit;
 ModifierCount:= 0;
-for c in Modifier do
-    if(c = ':') then inc(ModifierCount);
+
+for i:= 1 to Length(Modifier) do
+    if(Modifier[i] = ':') then inc(ModifierCount);
 
 SplitByChar(Modifier, mod_, ':');//remove the first mod: part
 Modifier:= mod_;