Verified Commit 6aa9d9b7 authored by Rahix's avatar Rahix
Browse files

fix(gfx): Fix text being offset by one character



Text was displayed one character further right than intended because the
offset was incremented before drawing.  This commit reverses the two
operations and thus restores proper display of text.

Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 4ff73ad3
......@@ -87,6 +87,9 @@ void gfx_puts(
Color bg
) {
while (*str) {
gfx_putchar(font, r, x, y, *str, fg, bg);
str++;
x += font->Width;
if (x >= r->width) {
x = 0;
......@@ -94,8 +97,6 @@ void gfx_puts(
}
if (y >= r->height)
return;
gfx_putchar(font, r, x, y, *str, fg, bg);
str++;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment