diff options
author | zugz (tox) <mbays+tox@sdf.org> | 2018-11-23 18:07:05 +0100 |
---|---|---|
committer | zugz (tox) <mbays+tox@sdf.org> | 2018-11-23 18:09:45 +0100 |
commit | caca350f435cf6a2a3778c64771dafdb7dde8b7a (patch) | |
tree | 4db947c2a0e57b8277683c46e19535b06b75095f /auto_tests | |
parent | 0bf90df5e138e926fac9073f371b9b9be4af40c3 (diff) |
Avoid format truncation in save compatibility test
(without this, gcc-8.2.0 issues a warning)
Diffstat (limited to 'auto_tests')
-rw-r--r-- | auto_tests/save_compatibility_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
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[]) | |||
144 | base_path[strrchr(base_path, '/') - base_path] = 0; | 144 | base_path[strrchr(base_path, '/') - base_path] = 0; |
145 | } | 145 | } |
146 | 146 | ||
147 | char save_path[4096]; | 147 | char save_path[4096 + sizeof(LOADED_SAVE_FILE)]; |
148 | snprintf(save_path, sizeof(save_path), "%s/%s", base_path, LOADED_SAVE_FILE); | 148 | snprintf(save_path, sizeof(save_path), "%s/%s", base_path, LOADED_SAVE_FILE); |
149 | 149 | ||
150 | test_save_compatibility(save_path); | 150 | test_save_compatibility(save_path); |