mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-01-10 08:27:48 +05:30
reverse-ramdisk.c: use size_t
type for enumerating
This commit is contained in:
parent
db83a7a2e4
commit
a5898629f1
@ -143,8 +143,8 @@ int tf_free(int ID) {
|
|||||||
free(temp_files[index].file_path);
|
free(temp_files[index].file_path);
|
||||||
|
|
||||||
// Shift the remaining temp files in the array
|
// Shift the remaining temp files in the array
|
||||||
for (int i = index; i < num_temp_files - 1; i++)
|
for (size_t i = index; i < num_temp_files - 1; i++)
|
||||||
temp_files[(size_t) i] = temp_files[(size_t) i + 1];
|
temp_files[i] = temp_files[i + 1];
|
||||||
|
|
||||||
// Reallocate memory for the temp_files array
|
// Reallocate memory for the temp_files array
|
||||||
if (--num_temp_files > 0) {
|
if (--num_temp_files > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user