Fix double tmp override in chTeamBack; Use shortstring for sidTeamGone/sidTeamBack
authorWuzzy <Wuzzy2@mail.ru>
Fri, 05 Oct 2018 23:51:58 +0200
changeset 13889 086aa3ae097f
parent 13887 b15ad95320fe
child 13891 26ebbf9717fd
Fix double tmp override in chTeamBack; Use shortstring for sidTeamGone/sidTeamBack
hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Fri Oct 05 16:54:26 2018 -0400
+++ b/hedgewars/uTeams.pas	Fri Oct 05 23:51:58 2018 +0200
@@ -782,7 +782,7 @@
 procedure chTeamGone(var s:shortstring);
 var t, i: LongInt;
     isSynced: boolean;
-    tmp: ansistring;
+    tmp: shortstring;
 begin
     isSynced:= s[1] = 's';
 
@@ -805,7 +805,7 @@
                     begin
                     tmp:= ' ' + trmsg[sidTeamGone];
                     tmp:= '*' + tmp;
-                    AddChatString(#7 + FormatA(tmp, TeamName));
+                    AddChatString(#7 + Format(tmp, TeamName));
                     if not CurrentTeam^.ExtDriven then SendIPC(_S'f' + s);
                     hasGone:= true;
                     skippedTurns:= 0;
@@ -828,7 +828,7 @@
 procedure chTeamBack(var s:shortstring);
 var t: LongInt;
     isSynced: boolean;
-    tmp: ansistring;
+    tmp: shortstring;
 begin
     isSynced:= s[1] = 's';
 
@@ -846,8 +846,8 @@
             if hasGone then
                 begin
                 tmp:= ' '+trmsg[sidTeamBack];
-                tmp:= '*'+trmsg[sidTeamBack];
-                AddChatString(#8 + FormatA(tmp, TeamName));
+                tmp:= '*'+tmp;
+                AddChatString(#8 + Format(tmp, TeamName));
                 if not CurrentTeam^.ExtDriven then SendIPC(_S'g' + s);
                 hasGone:= false;