QTfrontend/ui/widget/selectWeapon.cpp
changeset 6479 4f08821cbff5
parent 6472 bced12412f94
child 6616 f77bb02b669f
--- a/QTfrontend/ui/widget/selectWeapon.cpp	Sat Dec 03 14:43:09 2011 +0100
+++ b/QTfrontend/ui/widget/selectWeapon.cpp	Sat Dec 03 15:01:57 2011 +0100
@@ -254,7 +254,7 @@
     if(wconf->contains(newName)) {
         //name already used -> look for an appropriate name:
         int i=2;
-        while(wconf->contains(newName = tr("new")+QString::number(i++)));
+        while(wconf->contains(newName = tr("new")+QString::number(i++))) ;
     }
     setWeaponsName(newName);
 }
@@ -285,7 +285,7 @@
         if(wconf->contains(newName)) {
             //name already used -> look for an appropriate name:
             int i=2;
-            while(wconf->contains(newName = tr("copy of") + " " + curWeaponsName+QString::number(i++)));
+            while(wconf->contains(newName = tr("copy of") + " " + curWeaponsName+QString::number(i++))) ;
         }
         setWeaponsName(newName);
         setWeapons(ammo);