diff --git a/c-programming/reverse-ramdisk.c b/c-programming/reverse-ramdisk.c index 233d8ed..f99fce9 100644 --- a/c-programming/reverse-ramdisk.c +++ b/c-programming/reverse-ramdisk.c @@ -124,9 +124,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++) { + for (int i = index; i < num_temp_files - 1; i++) temp_files[(size_t) i] = temp_files[(size_t) i + 1]; - } num_temp_files--;