From d2bb2fc5a11e1d25946f152830ff2f543204d2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Sat, 16 Dec 2023 15:36:32 +0100 Subject: [PATCH] png2c: apply small fix backported from 318a84f --- tools/png2c.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/png2c.py b/tools/png2c.py index 26e30475..d7aa83ee 100755 --- a/tools/png2c.py +++ b/tools/png2c.py @@ -418,6 +418,8 @@ def do_palette(im, desc): cmap = [pal[i * 3:(i + 1) * 3] for i in range(colors)] + print("#define %s_count %d\n" % (name, len(cmap))) + print('%sconst PaletteT %s = {' % ('' if shared else 'static ', name)) print(' .count = %d,' % len(cmap)) print(' .colors = {')