~pixelherodev/zyg

ce32905e7be3b1f285d8da7ec6a95f8b8c6efee5 — Noam Preil 27 days ago 3305e02 tmp
[driver] check fread
2 files changed, 1 insertions(+), 2 deletions(-)

M driver.c
M profile.sh -rw-r--r-- => -rwxr-xr-x
M driver.c => driver.c +1 -2
@@ 335,8 335,7 @@ tests(void)
	if(f == NULL)
		FATAL_EXIT("Failed to open test binary", 0);
	cpu->memory = calloc(65536, 1);
	fread(&((char*)cpu->memory)[0x20], 1, 65536 - 0x20, f);
	if(ferror(f))
	if(fread(&((char*)cpu->memory)[0x20], 1, 65536 - 0x20, f) == 0 || ferror(f))
		FATAL_EXIT("failed to read test binary", 0);
	fclose(f);
	cpu->read_byte = cpu_read;

M profile.sh => profile.sh +0 -0