mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Avoid format truncation in save compatibility test
(without this, gcc-8.2.0 issues a warning)
This commit is contained in:
parent
0bf90df5e1
commit
caca350f43
|
@ -144,7 +144,7 @@ int main(int argc, char *argv[])
|
||||||
base_path[strrchr(base_path, '/') - base_path] = 0;
|
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);
|
snprintf(save_path, sizeof(save_path), "%s/%s", base_path, LOADED_SAVE_FILE);
|
||||||
|
|
||||||
test_save_compatibility(save_path);
|
test_save_compatibility(save_path);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user