From 267cf14d189f9c317c026b04661d47798ff29b12 Mon Sep 17 00:00:00 2001 From: Gabriel GRONDIN Date: Wed, 17 Nov 2021 16:46:15 +0100 Subject: [PATCH] Fix bytes_align ? --- pzztool.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pzztool.py b/pzztool.py index 330b447..df72cfe 100644 --- a/pzztool.py +++ b/pzztool.py @@ -58,12 +58,8 @@ def pzz_decompress(compressed_bytes: bytes): def bytes_align(bout: bytes): - success = False - while not success: - bout.extend(b"\x00\x00") - address = len(bout) - if hex(address).endswith("00"): - break + while not hex(len(bout)).endswith("000"): + bout.extend(b"\x00") def pzz_compress(b):