From 20a2620ffc865732b021048b12910b765ff1f893 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 21 Dec 2019 18:10:12 +0100 Subject: [PATCH] CPC_check_AMSDOS() fix for files below 128 bytes --- src/oldies.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/oldies.c b/src/oldies.c index d7f34d16..83953ede 100644 --- a/src/oldies.c +++ b/src/oldies.c @@ -741,7 +741,11 @@ int CPC_check_AMSDOS(FILE * file, word * loading_address, unsigned long * file_l fseek(file, 0, SEEK_SET); if (!Read_bytes(file, data, 128)) + { + // Rewind the file so it can be read normally + fseek(file, 0, SEEK_SET); return 0; + } // Rewind the file so it can be read normally fseek(file, 0, SEEK_SET);