Duke3D: Fix internal compiler errors when script buffer is resized.
As mentioned in the issue linked below:
- The
bitptr
memory isn't sanitized after being reallocated, meaning that in the last few blocks of memory, random data may be interpreted as pointers in the correctness check, thus causing errors. -
apScript[i]
may be equivalent tog_scriptPtr
in the edge-case where the script buffer is resized right after any "if" statement is parsed. This results in a false positive inside the correctness check.
This merge request fixes both issues.
Fixes #137 (closed)