Fix asset packer encoding

This commit is contained in:
Willy-JL
2023-02-27 19:15:29 +00:00
parent 007447cc61
commit b7d4b1c73d
+1 -1
View File
@@ -30,7 +30,7 @@ def convert_bm(img: "Image.Image | pathlib.Path") -> bytes:
data_enc = bytearray(data_encoded_str)
data_enc = bytearray([len(data_enc) & 0xFF, len(data_enc) >> 8]) + data_enc
if len(data_enc) < len(data_bin) + 1:
if len(data_enc) + 2 < len(data_bin) + 1:
return b"\x01\x00" + data_enc
else:
return b"\x00" + data_bin