1
0
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:
Intel A80486DX2-66 2024-01-03 21:10:22 +03:00
parent db83a7a2e4
commit a5898629f1
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -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) {