Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Broken reading of a Save of The Sacred Tears TRUE #155
When run with _DEBUG, it'll warn about multiple skipped chunks and it'll crash because of running out of bytes. What breaks liblcf is a keyinput_variable (0x16) at 0x3846, inside the SaveEventData of the 8th CommonEvent.
should be parsed as:
But it's actually parsed as:
keyinput_variable saves the variable used by the last KeyInputProc. Here's the funny part. In this case, the last KeyInputProc saves the input value in the variable 908. Now: 908 = 0x038C. So keyinput_variable seems to be actually saving the last byte, not the whole number.
referenced this issue
Sep 20, 2015
added a commit
Sep 23, 2015
This is a bug I knew about for a long time but not the cause. Turns out RM incorrectly saves this variable as boolean (which internally just copies 1 byte) instead of a var-len integer, probably a copy-paste error from the surrounding booleans.
Unfortunately this means it's hard to fix for me because if I would simply change this into an integer, then RPG_RT would encounter the same problem you had for certain saves and crash with a "stream read error" for bytes with the highest bit set. I'll see, maybe I'll save in a new chunk and load from both so that compatibility (at least for variables <128) is still okay.