summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/line.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/gui/line.c b/apps/gui/line.c
index 5e22d6d..4d08a34 100644
--- a/apps/gui/line.c
+++ b/apps/gui/line.c
@@ -210,6 +210,8 @@ static void print_line(struct screen *display,
tempbuf_idx = tempbuf[tempbuf_idx] = 0;
put_text(display, xpos, y, line, tempbuf, false, 0);
xpos += display->getstringsize(tempbuf, NULL, NULL);
+ if (xpos >= max_width)
+ return;
}
next:
ch = *fmt++;