Skip to content

Commit f206e06

Browse files
committed
Closes ROM file after reading
1 parent 300072a commit f206e06

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/x11-calc-cpu.c

+2
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@
380380
* 17 Feb 24 - Only uses hidden data files in the $HOME folder - MT
381381
* - Fixed get_datafile_path() - again. Hopefully it will
382382
* work properly now - MT
383+
* 19 Feb 24 - Closes ROM file after reading - MT
383384
*
384385
* To Do - Finish adding code to display any modified registers
385386
* to every instruction.
@@ -688,6 +689,7 @@ void v_read_rom(oprocessor *h_processor, char *s_pathname) /* Load rom from 'obj
688689
if (i_count < ROM_SIZE) i_rom[i_count++] = i_opcode;
689690
}
690691
}
692+
fclose(h_file);
691693
}
692694
else
693695
v_error(h_err_opening_file, s_pathname); /* Can't open data file */

0 commit comments

Comments
 (0)