summaryrefslogtreecommitdiff
path: root/apps/gui/splash.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/splash.c')
-rw-r--r--apps/gui/splash.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index 65c3ad8c13..d0f1fbb67c 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -73,11 +73,11 @@ static bool splash_internal(struct screen * screen, const char *fmt, va_list ap,
73 if (!next) 73 if (!next)
74 return false; /* nothing to display */ 74 return false; /* nothing to display */
75 75
76 lines[line].len = next_len + 1; 76 lines[line].len = next_len;
77 lines[line].str = next; 77 lines[line].str = next;
78 while (true) 78 while (true)
79 { 79 {
80 w = font_getstringnsize(next, next_len + 1, NULL, NULL, fontnum); 80 w = font_getstringnsize(next, next_len, NULL, NULL, fontnum);
81 if (lastbreak) 81 if (lastbreak)
82 { 82 {
83 len = next - lastbreak; 83 len = next - lastbreak;
@@ -90,18 +90,19 @@ static bool splash_internal(struct screen * screen, const char *fmt, va_list ap,
90 break; /* screen full or out of lines */ 90 break; /* screen full or out of lines */
91 x = 0; 91 x = 0;
92 y += chr_h; 92 y += chr_h;
93 lines[++line].len = next_len + len; 93 lines[++line].len = next_len;
94 lines[line].str = next; 94 lines[line].str = next;
95 } 95 }
96 else 96 else
97 { 97 {
98 /* restore & calculate spacing */ 98 /* restore & calculate spacing */
99 lines[line].len += next_len + len + 1; 99 lines[line].len += next_len + 1;
100 x += next_w; 100 x += next_w;
101 } 101 }
102 } 102 }
103 x += w; 103 x += w;
104 lastbreak = next + next_len + 1; 104
105 lastbreak = next + next_len;
105 lastbrkchr = *lastbreak; 106 lastbrkchr = *lastbreak;
106 107
107 next = strptokspn_r(NULL, matchstr, &next_len, &store); 108 next = strptokspn_r(NULL, matchstr, &next_len, &store);