No-op when entering /clan command with no argument
authorWuzzy <Wuzzy2@mail.ru>
Sat, 06 Oct 2018 01:00:02 +0200
changeset 13877 65fe3933b19d
parent 13876 5df16be168ff
child 13878 4608300bc2fc
No-op when entering /clan command with no argument
hedgewars/uChat.pas
--- a/hedgewars/uChat.pas	Fri Oct 05 21:43:48 2018 -0400
+++ b/hedgewars/uChat.pas	Sat Oct 06 01:00:02 2018 +0200
@@ -511,9 +511,10 @@
         end;
 
     // “/clan” or “/team” (“/team” is an alias for “/clan”)
-    if ((copy(s, 2, 5) = 'clan ') or (copy(s, 2, 5) = 'team ')) and (length(s) > 6) then
+    if ((copy(s, 2, 5) = 'clan ') or (copy(s, 2, 5) = 'team ')) then
         begin
-        ParseCommand('team ' + copy(s, 7, Length(s) - 6), true);
+        if (Length(s) > 6) then
+            ParseCommand('team ' + copy(s, 7, Length(s) - 6), true);
         exit
         end;