From 91e028794a48588ba26cc69ab5d57d8ef843a3e6 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 7 May 2019 12:33:54 +0200 Subject: [PATCH] Fix UI palette remapping when pixel width > 1 Fixes bug #111 http://pulkomandy.tk/projects/GrafX2/ticket/111 --- src/engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine.c b/src/engine.c index 38a665ba..92ff893c 100644 --- a/src/engine.c +++ b/src/engine.c @@ -3748,7 +3748,7 @@ void Remap_UI_in_window_backgrounds(const byte * conversion_table) min_x -= Window_stack[i].Pos_X; max_x -= Window_stack[i].Pos_X; // do the conversion - for (x = min_x; x < max_x; x++) + for (x = min_x * Pixel_width; x < max_x * Pixel_width; x++) { p[x] = conversion_table[p[x]]; }