hedgewars/uFLUICallback.pas
branchqmlfrontend
changeset 11843 01f88c3b7b66
parent 11842 93e6c401cc3d
--- a/hedgewars/uFLUICallback.pas	Tue Aug 02 23:08:17 2016 +0300
+++ b/hedgewars/uFLUICallback.pas	Thu Aug 11 23:05:14 2016 +0300
@@ -14,10 +14,9 @@
 
 procedure engineMessageCallback(p: pointer; msg: PChar; len: Longword);
 begin
-    if msg^ = 'T' then
+    if (len >= 3) and (msg[1] = 'T') then
     begin
-        inc(msg);
-        isGame:= msg^ = 'G';
+        isGame:= msg[2] = 'G';
         exit;
     end;