mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-27 01:20:28 +03:00
ref types are currently passed to HLL functions as pointers into the heap. If the HLL function itself needs to allocate memory from the heap, it can cause the heap to be reallocated, rendering these heap pointers invalid. In order to work around this, hll_call now guarantees 64 slots are available on the heap before calling any HLL function. This is not a great solution, but it should work to the extent that HLL functions only allocate a fixed number of heap slots < 64. This bug could be easily triggered by scrolling up on the message log in Sengoku Rance.