mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-30 06:29:48 +00:00
Zero, not NULL.
Not that there's a practical difference, but we should be clear that we're zeroing out memory because its contents are vm_8bit values, not pointers.
This commit is contained in:
parent
0bcf9e006d
commit
bb92162dba
@ -38,9 +38,9 @@ vm_segment_create(size_t size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// We should NULL out memory and make explicit that any new segment
|
||||
// We should zero out memory and make explicit that any new segment
|
||||
// begins life in that state.
|
||||
memset(segment->memory, (int)NULL, sizeof(vm_8bit));
|
||||
memset(segment->memory, 0, sizeof(vm_8bit));
|
||||
|
||||
segment->read_table = malloc(sizeof(vm_segment_read_fn) * size);
|
||||
if (segment->read_table == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user