# HG changeset patch # User sheepluva # Date 1462295169 -7200 # Node ID bb745219d882ea76885a1a4497d22a10651c86cd # Parent 984f9c76146db0e643dbba8bcaa8a39bf18010fb small code cleanup/comment diff -r 984f9c76146d -r bb745219d882 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