mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-30 06:29:48 +00:00
We should also NULL out segment memory.
Er... oops
This commit is contained in:
parent
06705f21fc
commit
6f4627802f
@ -38,6 +38,10 @@ vm_segment_create(size_t size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// We should NULL out memory and make explicit that any new segment
|
||||
// begins life in that state.
|
||||
memset(segment->memory, (int)NULL, sizeof(vm_8bit));
|
||||
|
||||
segment->read_table = malloc(sizeof(vm_segment_read_fn) * size);
|
||||
if (segment->read_table == NULL) {
|
||||
log_critical("Couldn't allocate enough space for segment read_table");
|
||||
|
Loading…
Reference in New Issue
Block a user