From 6cbe41fbc1eb1c7eb26dd02eb78f695bfde9820c Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Thu, 10 Jan 2008 04:23:41 +0000 Subject: [PATCH] Fixes hang/crash on empty config file. (patch by Wilbert Pol) --- src/lib/util/corefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }