CPC_check_AMSDOS() fix for files below 128 bytes

This commit is contained in:
Thomas Bernard 2019-12-21 18:10:12 +01:00
parent 4737d20757
commit 20a2620ffc
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

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