From 5b8d9c9d2e66fc8195961ccd3bbca590a9e45d74 Mon Sep 17 00:00:00 2001 From: glx22 Date: Fri, 23 Jan 2026 23:36:17 +0100 Subject: [PATCH] Codefix: There's a new black version --- nml/spriteencoder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nml/spriteencoder.py b/nml/spriteencoder.py index 71a488141..2d5b267a5 100644 --- a/nml/spriteencoder.py +++ b/nml/spriteencoder.py @@ -297,7 +297,7 @@ def encode_sprite(self, sprite_info): if im.mode == "RGBA": info_byte |= INFO_ALPHA - (im_width, im_height) = im.size + im_width, im_height = im.size if x < 0 or y < 0 or x + size_x > im_width or y + size_y > im_height: pos = generic.build_position(sprite_info.poslist) raise generic.ScriptError("Read beyond bounds of image file '{}'".format(filename_32bpp.value), pos) @@ -320,7 +320,7 @@ def encode_sprite(self, sprite_info): im_mask_pal = palette.validate_palette(mask_im, filename_8bpp.value) info_byte |= INFO_PAL - (im_width, im_height) = mask_im.size + im_width, im_height = mask_im.size if mask_x < 0 or mask_y < 0 or mask_x + size_x > im_width or mask_y + size_y > im_height: pos = generic.build_position(sprite_info.poslist) raise generic.ScriptError("Read beyond bounds of image file '{}'".format(filename_8bpp.value), pos)