mirror of
https://github.com/Artrios/pokecarde.git
synced 2026-03-21 17:24:35 -05:00
cleanup: Very small refactor for stripgbc (#5)
This commit is contained in:
parent
128dc8fc12
commit
ab883b0717
|
|
@ -13,9 +13,11 @@ with open(sys.argv[1], 'rb') as f:
|
|||
|
||||
# the program shall end with $FF followed only by $00 bytes
|
||||
# for every $FF we hit, buffer until something that isn’t $00
|
||||
if (not buffering and ord(byte) == 0xFF) or (buffering and ord(byte) == 0x00):
|
||||
if not buffering and ord(byte) == 0xFF:
|
||||
buf += byte
|
||||
buffering = True
|
||||
elif buffering and ord(byte) == 0x00:
|
||||
buf += byte
|
||||
elif buffering and ord(byte) == 0xFF:
|
||||
out.write(buf)
|
||||
buf = byte
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user