From 62a49a543e5e4089c44e5ab99be20df73413b966 Mon Sep 17 00:00:00 2001 From: lephe Date: Tue, 27 Aug 2019 21:02:28 +0200 Subject: [PATCH] topti: spacing bug fix on fxcg50 Fixes a bug where spaces were not being rendered. --- src/render-cg/topti.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/render-cg/topti.c b/src/render-cg/topti.c index aa588f0..28f4707 100644 --- a/src/render-cg/topti.c +++ b/src/render-cg/topti.c @@ -83,10 +83,11 @@ void topti_render(int x, int y, char const *str, size_t size, font_t const *f, /* Draw the space if background is opaque */ int prop_space = (c == ' ' && f->prop) ? 5 : 0; - if((active_space && bg >= 0) || prop_space) + if(active_space || prop_space) { active_space += prop_space; - drect(x, y, x + active_space - 1, y + height - 1, bg); + if(bg >= 0) drect(x, y, x + active_space - 1, + y + height - 1, bg); } x += active_space; if(prop_space) { active_space = space; continue; }