# HG changeset patch
# User unc0rr
# Date 1371325553 -14400
# Node ID 3774ac58e65e40f37725f4d1f0c4af5b5fb854fd
# Parent  d923ba9d114519266f9b73f411a10ae2aacbfde2
 - Fix 'and not' without parentheses
 - Better detection of such occasions

diff -r d923ba9d1145 -r 3774ac58e65e hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sat Jun 15 23:44:37 2013 +0400
+++ b/hedgewars/GSHandlers.inc	Sat Jun 15 23:45:53 2013 +0400
@@ -1593,7 +1593,7 @@
     if (Gear^.dY.QWordValue = 0) and (Gear^.dY.QWordValue = 0) and (TestCollisionYwithGear(Gear, 1) = 0) then
         SetLittle(Gear^.dY);
     Gear^.State := Gear^.State or gstAnimation;
-    if Gear^.Health < cBarrelHealth then Gear^.State:= Gear^.State and not gstFrozen;
+    if Gear^.Health < cBarrelHealth then Gear^.State:= Gear^.State and (not gstFrozen);
 
     if ((Gear^.dX.QWordValue <> 0)
     or (Gear^.dY.QWordValue <> 0))  then
@@ -1679,7 +1679,7 @@
                 Gear^.Message := Gear^.Message and (not (gmLJump or gmHJump));
         exit
         end;
-    if (k = gtExplosives) and (Gear^.Health < cBarrelHealth) then Gear^.State:= Gear^.State and not gstFrozen;
+    if (k = gtExplosives) and (Gear^.Health < cBarrelHealth) then Gear^.State:= Gear^.State and (not gstFrozen);
 
     if ((k <> gtExplosives) and (Gear^.Damage > 0)) or ((k = gtExplosives) and (Gear^.Health<=0)) then
         begin
diff -r d923ba9d1145 -r 3774ac58e65e tools/pas2c/PascalParser.hs
--- a/tools/pas2c/PascalParser.hs	Sat Jun 15 23:44:37 2013 +0400
+++ b/tools/pas2c/PascalParser.hs	Sat Jun 15 23:45:53 2013 +0400
@@ -24,9 +24,10 @@
     return u
 
 iD = do
-    i <- liftM (flip Identifier BTUnknown) (identifier pas)
+    i <- identifier pas
     comments
-    return i
+    when (i == "not") $ unexpected "'not' used as an identifier"
+    return $ Identifier i BTUnknown
 
 unit = do
     string "unit" >> comments