From caca350f435cf6a2a3778c64771dafdb7dde8b7a Mon Sep 17 00:00:00 2001 From: "zugz (tox)" Date: Fri, 23 Nov 2018 18:07:05 +0100 Subject: [PATCH] Avoid format truncation in save compatibility test (without this, gcc-8.2.0 issues a warning) --- auto_tests/save_compatibility_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_tests/save_compatibility_test.c b/auto_tests/save_compatibility_test.c index 216b368c..a32015b4 100644 --- a/auto_tests/save_compatibility_test.c +++ b/auto_tests/save_compatibility_test.c @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) base_path[strrchr(base_path, '/') - base_path] = 0; } - char save_path[4096]; + char save_path[4096 + sizeof(LOADED_SAVE_FILE)]; snprintf(save_path, sizeof(save_path), "%s/%s", base_path, LOADED_SAVE_FILE); test_save_compatibility(save_path);