hedgewars/uIO.pas
changeset 6874 b9e2e509a42d
parent 6700 e04da46ee43c
child 6876 f588dfc27da3
--- a/hedgewars/uIO.pas	Mon Apr 09 22:01:36 2012 +0400
+++ b/hedgewars/uIO.pas	Mon Apr 09 23:36:23 2012 +0400
@@ -347,9 +347,11 @@
         't': ParseCommand('taunt ' + headcmd^.str[2], true);
         'h': ParseCommand('hogsay ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
         '1'..'5': ParseCommand('timer ' + headcmd^.cmd, true);
-        #128..char(128 + cMaxSlotIndex): ParseCommand('slot ' + char(byte(headcmd^.cmd) - 79), true)
         else
-            OutError('Unexpected protocol command: ' + headcmd^.cmd, True)
+            if headcmd^.cmd >= #128 and headcmd^.cmd <= char(128 + cMaxSlotIndex) then
+                ParseCommand('slot ' + char(byte(headcmd^.cmd) - 79), true)
+                else
+                OutError('Unexpected protocol command: ' + headcmd^.cmd, True)
         end;
     RemoveCmd
     end;