mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-12-24 22:59:49 +05:30
reverse-ramdisk.c: correct snprintf
call
This commit is contained in:
parent
f6a8c9025e
commit
be048aa266
@ -67,7 +67,7 @@ int tf_alloc(size_t n, size_t type_size) {
|
||||
line_fail(-2);
|
||||
return -1;
|
||||
}
|
||||
int res = snprintf(file_path, file_path_len, "tf_%" PRIuMAX ".tmp",
|
||||
int res = snprintf(file_path, file_path_len + 1, "tf_%" PRIuMAX ".tmp",
|
||||
(uintmax_t) num_temp_files);
|
||||
if ((size_t) res != file_path_len) {
|
||||
line_fail(-2);
|
||||
|
Loading…
Reference in New Issue
Block a user