mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-01-10 17:32:05 +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);
|
line_fail(-2);
|
||||||
return -1;
|
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);
|
(uintmax_t) num_temp_files);
|
||||||
if ((size_t) res != file_path_len) {
|
if ((size_t) res != file_path_len) {
|
||||||
line_fail(-2);
|
line_fail(-2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user