mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
(MESS) avoid usage of uninitialized memory in nc.c (MT05130) [Oliver Stöneberg]
This commit is contained in:
parent
0f2c9098ba
commit
06bed52397
@ -429,7 +429,8 @@ static void nc_common_restore_memory_from_stream(running_machine &machine)
|
||||
|
||||
LOG(("restoring nc memory\n"));
|
||||
/* get size of memory data stored */
|
||||
state->m_file->read(&stored_size, sizeof(unsigned long));
|
||||
if (state->m_file->read(&stored_size, sizeof(unsigned long)) != sizeof(unsigned long))
|
||||
stored_size = 0;
|
||||
|
||||
if (stored_size > machine.device<ram_device>(RAM_TAG)->size())
|
||||
restore_size = machine.device<ram_device>(RAM_TAG)->size();
|
||||
|
Loading…
Reference in New Issue
Block a user