]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/game.cpp
Do not print a string into itself.
[quix0rs-blobwars.git] / src / game.cpp
index b10c68a0c17379d157e9cc253945ba1aa3743c0a..8257e20164fddcdab2ba29797573ab73a0b2c22d 100644 (file)
@@ -316,7 +316,9 @@ int gameover()
        if (game.canContinue > 1)
        {
                Widget *widget = engine.getWidgetByName("gameOverNo");
-               snprintf(widget->label, sizeof widget->label, "%s (%d)", widget->label, game.canContinue);
+               char postfix[100];
+               snprintf(postfix, sizeof postfix, " (%d)", game.canContinue);
+               strncat(widget->label, postfix, sizeof widget->label);
        }
 
        while (true)