Skip to content

Commit

Permalink
Better fix for #142
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 8, 2018
1 parent 0a21fb4 commit 647f573
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ static const uae_char *kickstring = "exec.library";
static int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksum, int noalias)
{
uae_char buffer[20];
volatile int i, j, oldpos;
int i, j, oldpos;
int cr = 0, kickdisk = 0;

if (size < 0) {
Expand All @@ -578,6 +578,8 @@ static int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksu
}
oldpos = zfile_ftell (f);
i = zfile_fread (buffer, 1, 11, f);
if (i < 11) // Unable to read kickstart file
return 0;
if (!memcmp(buffer, "KICK", 4)) {
zfile_fseek (f, 512, SEEK_SET);
kickdisk = 1;
Expand Down

0 comments on commit 647f573

Please sign in to comment.