diff --git a/bemani/format/afp/geo.py b/bemani/format/afp/geo.py index ec851ea..75d857c 100644 --- a/bemani/format/afp/geo.py +++ b/bemani/format/afp/geo.py @@ -182,7 +182,7 @@ class Shape: if mode != 4: raise Exception("Unexpected mode in GE2D structure!") - if (flags & 0x2) and len(labels) == 0: + if (flags & 0x2) and not labels: raise Exception("GE2D structure has a texture, but no region labels present!") if (flags & 0x2) and (tex1 == 0xFF): raise Exception("GE2D structure requests a texture, but no texture pointer present!") diff --git a/bemani/format/afp/util.py b/bemani/format/afp/util.py index dafc903..61d5f1b 100644 --- a/bemani/format/afp/util.py +++ b/bemani/format/afp/util.py @@ -23,7 +23,7 @@ def pad(data: bytes, length: int) -> bytes: def descramble_text(text: bytes, obfuscated: bool) -> str: - if len(text): + if text: if obfuscated and (text[0] - 0x20) > 0x7F: # Gotta do a weird demangling where we swap the # top bit.