Fixes hang/crash on empty config file. (patch by Wilbert Pol)

This commit is contained in:
R. Belmont 2008-01-10 04:23:41 +00:00
parent 19205daeb0
commit 6cbe41fbc1

View File

@ -290,7 +290,7 @@ UINT32 core_fread(core_file *file, void *buffer, UINT32 length)
/* read the remainder directly from the file */
else
{
UINT32 new_bytes_read;
UINT32 new_bytes_read = 0;
filerr = osd_read(file->file, (UINT8 *)buffer + bytes_read, file->offset + bytes_read, length - bytes_read, &new_bytes_read);
bytes_read += new_bytes_read;
}