Skip to content

Commit

Permalink
Fixed an crash when short seed numbers are used
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgrew committed Jun 7, 2016
1 parent a6836cf commit 81c8e5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dwrandomizer.py
Expand Up @@ -685,6 +685,10 @@ def update_title_screen(self, seed, flags):
new_text += blank_line

needed_bytes = len(self.title_screen_text) - len(new_text) - 4
if needed_bytes > 31: # current data is too short...
new_text = new_text[:-len(blank_line)] + (b'\x5f' * 32 + b'\xfc')
needed_bytes = len(self.title_screen_text) - len(new_text) - 4

new_text += b'\x5f' * needed_bytes + padding(32 - needed_bytes) + b'\xfc'
new_text = new_text.replace(b'\x47', b'\x61').replace(b'\x49', b'\x63')

Expand Down

0 comments on commit 81c8e5e

Please sign in to comment.