UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.19k stars 233 forks source link

Fix string reading bounds checks #1887

Closed colinator27 closed 3 months ago

colinator27 commented 3 months ago

Description

Parsing GameMaker null-terminated strings had an off-by-one error in their bounds checks, so if a string appeared directly at the end of a stream, it would throw an exception. This corrects the comparison to no longer be off by one.

Caveats

None that I am aware of, but if this triggers any actual bugs, it's probably extremely rare.

Notes

Based on discussion on Discord, brought to our attention by @luizzeroxis.

github-actions[bot] commented 3 months ago

Download the artifacts for this pull request here:

GUI:

CLI: