Avoid format truncation in save compatibility test

(without this, gcc-8.2.0 issues a warning)
This commit is contained in:
zugz (tox) 2018-11-23 18:07:05 +01:00
parent 0bf90df5e1
commit caca350f43
No known key found for this signature in database
GPG Key ID: 6F2BDA289D04F249

View File

@ -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);