Clear codeblock physical addresses when resetting codegen. Fixes out-of-bounds accesses to the pages[] array during reset.

This commit is contained in:
SarahW 2019-02-02 13:46:06 +00:00
commit 9a6376dbf9

View file

@ -161,7 +161,11 @@ void codegen_reset()
codeblock_t *block = &codeblock[c];
if (block->pc != BLOCK_PC_INVALID)
{
block->phys = 0;
block->phys_2 = 0;
delete_block(block);
}
}
memset(codeblock, 0, BLOCK_SIZE * sizeof(codeblock_t));