Skip to content

Commit

Permalink
improve parsing of SYSTEM.CNF when we do not have iso9660 library
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Sep 30, 2023
1 parent 78f2c22 commit 631209a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pop-fe.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ def get_gameid_from_iso(path='NORMAL01.iso'):
raise Exception('Could not read system.cnf')

buf = buf[idx + 6:idx + 50]
idx = buf.find('\\r')
if idx > 0:
buf = buf[:idx]
idx = buf.find('\r')
if idx > 0:
buf = buf[:idx]
idx = buf.find('\\n')
if idx > 0:
buf = buf[:idx]
idx = buf.find('\n')
Expand Down

0 comments on commit 631209a

Please sign in to comment.