hedgewars/uIO.pas
branchqmlfrontend
changeset 10606 8e95911cb86b
parent 10515 7705784902e1
parent 10562 3388822b3914
child 10748 dc587913987c
--- a/hedgewars/uIO.pas	Sat Nov 22 00:55:01 2014 +0300
+++ b/hedgewars/uIO.pas	Wed Dec 03 00:07:33 2014 +0300
@@ -286,7 +286,7 @@
 
 while (headcmd <> nil)
     and (tmpflag or (headcmd^.cmd = '#')) // '#' is the only cmd which can be sent within same tick after 'N'
-    and ((GameTicks = hiTicks shl 16 + headcmd^.loTime)
+    and ((GameTicks = LongWord(hiTicks shl 16 + headcmd^.loTime))
         or (headcmd^.cmd = 's') // for these commands time is not specified
         or (headcmd^.cmd = 'h') // seems the hedgewars protocol does not allow remote synced commands
         or (headcmd^.cmd = '#') // must be synced for saves to work
@@ -362,7 +362,7 @@
     end;
 
 if (headcmd <> nil) and tmpflag and (not CurrentTeam^.hasGone) then
-    TryDo(GameTicks < hiTicks shl 16 + headcmd^.loTime,
+    TryDo(GameTicks < LongWord(hiTicks shl 16) + headcmd^.loTime,
             'oops, queue error. in buffer: ' + headcmd^.cmd +
             ' (' + IntToStr(GameTicks) + ' > ' +
             IntToStr(hiTicks shl 16 + headcmd^.loTime) + ')',