pokemon-speedrunning / gambatte-speedrun

Fork of https://github.com/sinamas/gambatte with Pokemon speedrunning-related changes.
GNU General Public License v2.0
94 stars 27 forks source link

Fix segfaults on resets when revision string is unexpected size #34

Closed entrpntr closed 4 years ago

entrpntr commented 4 years ago

This was really only an immediate issue if built from zipped source (i.e. no git repo). The default revision name of "interim" would segfault on hard reset due to expectations in state_osd_elements.cpp about the revision string.

This fix will handle longer revision names in general, and put up to the first 8 characters in the on-screen display, while keeping the same look with the current r### format.

entrpntr commented 4 years ago

Current status: Waiting a bit before reviewing/merging. There will probably be 1 more commit to this branch to address another recently found bug with hard resets.

entrpntr commented 4 years ago

Update: After further testing console behavior, we decided not to make the other planned change (related to rapid disabling/enabling of LCD; the bug is purely cosmetic, and the proposed fix introduced incorrect behavior). So no other commits on this branch are forthcoming.