summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/corefile.c
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2008-01-10 04:23:41 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2008-01-10 04:23:41 +0000
commit6cbe41fbc1eb1c7eb26dd02eb78f695bfde9820c (patch)
tree4808e238d34342f4e115accf214ed1a5ad8eeea7 /src/lib/util/corefile.c
parent19205daeb03b0309ec3bc5d80cc2b233a5ede167 (diff)
Fixes hang/crash on empty config file. (patch by Wilbert Pol)
Diffstat (limited to 'src/lib/util/corefile.c')
-rw-r--r--src/lib/util/corefile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/util/corefile.c b/src/lib/util/corefile.c
index 0dc3098b45f..565886a54a9 100644
--- a/src/lib/util/corefile.c
+++ b/src/lib/util/corefile.c
@@ -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;
}