Don't call halt()
authorunc0rr
Wed, 05 Mar 2014 00:53:08 +0400
changeset 10176 ea022e9483c2
parent 10175 c92668840ea8
child 10177 0f9042536c46
child 10178 949b51ca18c6
Don't call halt()
hedgewars/hwengine.pas
--- a/hedgewars/hwengine.pas	Tue Mar 04 00:40:23 2014 +0400
+++ b/hedgewars/hwengine.pas	Wed Mar 05 00:53:08 2014 +0400
@@ -570,11 +570,12 @@
         Game();
 
     // return 1 when engine is not called correctly
-    {$IFDEF PAS2C OR HWLIBRARY}
-    exit(LongInt(GameType = gmtSyntax));
-    {$ELSE}
-    halt(LongInt(GameType = gmtSyntax));
-    {$ENDIF}
+    if GameType = gmtSyntax then
+        {$IFDEF PAS2C}
+        exit(1);
+        {$ELSE}
+        halt(1);
+        {$ENDIF}
 
 {$IFDEF HWLIBRARY}
 end;