Avoid creating unused string that is quite costly to produce
authorunC0Rr
Wed, 28 Aug 2024 13:36:52 +0200
changeset 16019 eb015d6b4a2a
parent 16018 692903667ece
child 16020 9be943326d9c
Avoid creating unused string that is quite costly to produce
hedgewars/uIO.pas
--- a/hedgewars/uIO.pas	Tue Aug 27 17:01:13 2024 +0200
+++ b/hedgewars/uIO.pas	Wed Aug 28 13:36:52 2024 +0200
@@ -470,8 +470,8 @@
     RemoveCmd
     end;
 
-if (headcmd <> nil) and tmpflag and (not CurrentTeam^.hasGone) then
-    checkFails(GameTicks < LongWord(hiTicks shl 16) + headcmd^.loTime,
+if (headcmd <> nil) and tmpflag and (not CurrentTeam^.hasGone) and (GameTicks < LongWord(hiTicks shl 16) + headcmd^.loTime) then
+    checkFails(true,
             'oops, queue error. in buffer: ' + headcmd^.cmd +
             ' (' + IntToStr(GameTicks) + ' > ' +
             IntToStr(hiTicks shl 16 + headcmd^.loTime) + ')',