mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-11-08 18:02:23 +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);
|
||||
|
||||
// Shift the remaining temp files in the array
|
||||
for (int i = index; i < num_temp_files - 1; i++)
|
||||
temp_files[(size_t) i] = temp_files[(size_t) i + 1];
|
||||
for (size_t i = index; i < num_temp_files - 1; i++)
|
||||
temp_files[i] = temp_files[i + 1];
|
||||
|
||||
// Reallocate memory for the temp_files array
|
||||
if (--num_temp_files > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user