aboutsummaryrefslogtreecommitdiff
path: root/libgui/gfx.c
diff options
context:
space:
mode:
authorMarvin Borner2020-11-23 22:19:54 +0100
committerMarvin Borner2020-11-23 22:19:54 +0100
commit8babf8b26e23ffdd8094c810295061effde153dd (patch)
tree98aebc32ae3f698b1381d507e595c788e34ada2a /libgui/gfx.c
parentf32a888e6fdcb13802f289ba1aa58b70fa9466f3 (diff)
Fixed some XML/HTML parsing bugs
Diffstat (limited to 'libgui/gfx.c')
-rw-r--r--libgui/gfx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libgui/gfx.c b/libgui/gfx.c
index 6d54550..0efedf9 100644
--- a/libgui/gfx.c
+++ b/libgui/gfx.c
@@ -121,10 +121,9 @@ void gfx_write(struct context *ctx, int x, int y, enum font_type font_type, u32
cnt = 0;
} else if (text[i] == '\n') {
cnt = 0;
- x = 0;
y += font->height;
} else if (text[i] == '\t') {
- x += 4 * font->width;
+ cnt += 4;
} else {
// TODO: Overflow on single line input
if ((cnt + 1) * font->width > ctx->width) {