topti: spacing bug fix on fxcg50

Fixes a bug where spaces were not being rendered.
This commit is contained in:
lephe 2019-08-27 21:02:28 +02:00
parent b3cbb0a43f
commit 62a49a543e
1 changed files with 3 additions and 2 deletions

View File

@ -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; }