]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/game.cpp
Use strlcat() and strlcpy(), #define wrappers when these functions are not available.
[quix0rs-blobwars.git] / src / game.cpp
index 1e04687b08b11cc87095cb83eabda4b1a6b6e65d..8a442afe6b3370f8fb59e04e9389285707b468e8 100644 (file)
@@ -318,7 +318,7 @@ int gameover()
                Widget *widget = engine.getWidgetByName("gameOverNo");
                char postfix[100];
                snprintf(postfix, sizeof postfix, " (%d)", game.canContinue);
-               strncat(widget->label, postfix, sizeof widget->label);
+               strlcat(widget->label, postfix, sizeof widget->label);
        }
 
        while (true)
@@ -575,7 +575,7 @@ int doGame()
        #if DEBUG
        Uint32 now;
        char fps[10];
-       strncpy(fps, "fps", sizeof fps);
+       strlcpy(fps, "fps", sizeof fps);
        #endif
 
        engine.messageTime = -1;