small code cleanup/comment
authorsheepluva
Tue, 03 May 2016 19:06:09 +0200
changeset 11799 bb745219d882
parent 11798 984f9c76146d
child 11800 6e6248c43942
small code cleanup/comment
hedgewars/uTouch.pas
--- a/hedgewars/uTouch.pas	Tue May 03 19:17:30 2016 +0300
+++ b/hedgewars/uTouch.pas	Tue May 03 19:06:09 2016 +0200
@@ -358,8 +358,10 @@
 var
     xCursor, yCursor, index : LongInt;
 begin
-//Check array sizes
-while Length(fingers) <= pointerCount do
+// check array size
+// note: pointerCount will be incremented later,
+// so at this point it's the index of the new entry
+if Length(fingers) <= pointerCount then
     begin
     setLength(fingers, Length(fingers)*2);
     for index := Length(fingers) div 2 to (Length(fingers)-1) do