New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken reading of a Save of The Sacred Tears TRUE #155

Closed
Zegeri opened this Issue Sep 20, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@Zegeri
Member

Zegeri commented Sep 20, 2015

This save file shared by @carstene1ns for EasyRPG/Player#579 is incorrectly parsed:
http://f4ke.de/dev/easyrpg/TSTT/Save03.lsd

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.

16 01 8C 17 01 01

should be parsed as:

keyinput_variable (size 01) (value 8c)
keyinput_all_directions (size 01) (value 01)

But it's actually parsed as:

keyinput_variable (size 01) (value 8c 17)
[crap]

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.

@fdelapena fdelapena added the Crash label Sep 20, 2015

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry Sep 20, 2015

Member

I can't even get the KeyInput in a simple test case to work.

Have an Auto Start Common Event that reads Left/Right and then Waits 1.0 second and a map event that changes its look based on the button. The look never changes :(

Member

Ghabry commented Sep 20, 2015

I can't even get the KeyInput in a simple test case to work.

Have an Auto Start Common Event that reads Left/Right and then Waits 1.0 second and a map event that changes its look based on the button. The look never changes :(

@Zegeri

This comment has been minimized.

Show comment
Hide comment
@Zegeri

Zegeri Sep 20, 2015

Member

That setup you've described works on my end. Try running it in TestPlay mode and looking at the table of variables during that second.

Member

Zegeri commented Sep 20, 2015

That setup you've described works on my end. Try running it in TestPlay mode and looking at the table of variables during that second.

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry Sep 20, 2015

Member

Yeah the problem I encountered was a different bug

Member

Ghabry commented Sep 20, 2015

Yeah the problem I encountered was a different bug

Zegeri added a commit to Zegeri/liblcf that referenced this issue Sep 23, 2015

@fdelapena fdelapena closed this in b9af522 Sep 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment