Use safe_seek()

I have no idea in what case these errors would crop up. But vulture said
the function was unused, not it's used.
This commit is contained in:
toofar 2023-11-05 17:20:26 +13:00
parent a7f154662e
commit cbcf941c83
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ def patch(file_to_patch: pathlib.Path = None):
parser = PakParser(f)
log.misc.debug(f"Patching pak entry: {parser.manifest_entry}")
offset = parser.find_patch_offset()
f.seek(offset)
binparsing.safe_seek(f, offset)
f.write(REPLACEMENT_URL)
except binparsing.ParseError:
log.misc.exception("Failed to apply quirk to resources pak.")