From 9537cfd3f8264700619f58d15741829489e1099e Mon Sep 17 00:00:00 2001 From: nOOb3167 Date: Sun, 22 Jul 2018 21:56:06 +0200 Subject: Add a MSVC / Windows compatible snprintf function (#7353) Use sizeof where applicable for mt_snprintf --- src/game.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 6e2583412..005241495 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -53,6 +53,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "nodedef.h" // Needed for determining pointing to nodes #include "nodemetadata.h" #include "particles.h" +#include "porting.h" #include "profiler.h" #include "quicktune_shortcutter.h" #include "raycast.h" @@ -4028,7 +4029,7 @@ void Game::showPauseMenu() char control_text_buf[600]; - snprintf(control_text_buf, ARRLEN(control_text_buf), control_text_template.c_str(), + porting::mt_snprintf(control_text_buf, sizeof(control_text_buf), control_text_template.c_str(), GET_KEY_NAME(keymap_forward), GET_KEY_NAME(keymap_backward), GET_KEY_NAME(keymap_left), -- cgit v1.2.3