hedgewars/uLocale.pas
changeset 13988 a04c86dc685f
parent 13903 5f819b90d479
child 14882 acb0526bf458
--- a/hedgewars/uLocale.pas	Thu Oct 25 17:02:56 2018 +0300
+++ b/hedgewars/uLocale.pas	Thu Oct 25 16:44:00 2018 +0200
@@ -159,14 +159,14 @@
             8: curArg:= arg9;
         end;
 
+        repeat
         p:= Pos('%'+IntToStr(i+1), tempstr);
-        if (p = 0) then
-            break
-        else
+        if (p <> 0) then
             begin
             delete(tempstr, p, 2);
             insert(curArg, tempstr, p);
             end;
+        until (p = 0);
     end;
 Format:= tempstr;
 end;
@@ -191,14 +191,14 @@
             8: curArg:= arg9;
         end;
 
+        repeat
         p:= Pos('%'+IntToStr(i+1), tempstr);
-        if (p = 0) then
-            break
-        else
+        if (p <> 0) then
             begin
             delete(tempstr, p, 2);
             insert(curArg, tempstr, p);
             end;
+        until (p = 0);
     end;
 FormatA:= tempstr;
 end;