Clear codeblock physical addresses when resetting codegen. Fixes out-of-bounds accesses to the pages[] array during reset.
This commit is contained in:
parent
2ccf771cf3
commit
9a6376dbf9
1 changed files with 4 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue