restore fpc 2.4.2 compatibility
authorXeli
Sat, 09 Jun 2012 12:15:05 +0200
changeset 7202 2d78dc517c91
parent 7200 744c8a5546c6
child 7204 522f165cd2e7
restore fpc 2.4.2 compatibility
hedgewars/uInputHandler.pas
--- 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_;