cknave/kevedit

Corrupt Boards prevent later boards from being editable

Closed this issue · 1 comments

I recently did a livestream of Ned The Knight and cracked open KevEdit mid-stream to help figure out what I was missing when stuck. The game's second file (NEDEND.ZZT) has a corrupt board in the middle of it, but several functioning boards afterwards. In ZZT's editor you can edit the boards after the corrupt one just fine, but currently in KevEdit the corrupt board and every board afterwards just shows up as "Error Loading Board" and appears blank.

This is the file in question: https://museumofzzt.com/file/n/knight.zip?file=NEDEND.ZZT&board=7

I believe I ran into the same issue when making the Museum file viewer and believe the problem was assuming that the byte after one board ends must be the byte where the next board begins. Using the board's reported size (which manages to stay correct when ZZT corrupts a board) as an offset to find the next board fixes this.

Figured I'd drop this here since you've been doing updates again! It's not exactly a pressing issue since so few ZZT worlds have corrupt boards that aren't the ":c" board of a super locked world which is the last board and doesn't have the issue.

Thanks for finding this! Fixed in 1.0.3.