diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-07-25 20:41:41 +0200 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-07-25 20:41:48 +0200 |
commit | 1054b5748ca2ad1fd598bb95312112f6568cb1dd (patch) | |
tree | 2f2bde489ff371eb72fa5fb23fcf2e6156d7a6d3 | |
parent | 7b5ce736db36e79d5bc4a0c60fb93bc8a7f54754 (diff) | |
download | rockbox-1054b5748ca2ad1fd598bb95312112f6568cb1dd.tar.gz rockbox-1054b5748ca2ad1fd598bb95312112f6568cb1dd.zip |
Revert "Ignore truncation in lcd-scroll.c"
This reverts commit 540637ed3334364fe9d1b54cdc96a52f59afda83.
Change-Id: I88e71ef47a11818a5acb407ff9c0723d3c197243
-rw-r--r-- | firmware/drivers/lcd-scroll.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index dd6a6fe8cb..0e17303bd3 100644 --- a/firmware/drivers/lcd-scroll.c +++ b/firmware/drivers/lcd-scroll.c | |||
@@ -140,7 +140,6 @@ void LCDFN(jump_scroll_delay)(int ms) | |||
140 | * Returns true if the text scrolled to the end */ | 140 | * Returns true if the text scrolled to the end */ |
141 | bool LCDFN(scroll_now)(struct scrollinfo *s) | 141 | bool LCDFN(scroll_now)(struct scrollinfo *s) |
142 | { | 142 | { |
143 | int len; | ||
144 | int width = LCDFN(getstringsize)(s->linebuffer, NULL, NULL); | 143 | int width = LCDFN(getstringsize)(s->linebuffer, NULL, NULL); |
145 | bool ended = false; | 144 | bool ended = false; |
146 | /* assume s->scroll_func() don't yield; otherwise this buffer might need | 145 | /* assume s->scroll_func() don't yield; otherwise this buffer might need |
@@ -165,12 +164,8 @@ bool LCDFN(scroll_now)(struct scrollinfo *s) | |||
165 | } | 164 | } |
166 | else | 165 | else |
167 | { | 166 | { |
168 | len = snprintf(line_buf, sizeof(line_buf)-1, "%s%s%s", | 167 | snprintf(line_buf, sizeof(line_buf)-1, "%s%s%s", |
169 | s->linebuffer, " ", s->linebuffer); | 168 | s->linebuffer, " ", s->linebuffer); |
170 | |||
171 | if ((unsigned) len > sizeof(line_buf)) | ||
172 | do { } while (0); /* ignore truncation */ | ||
173 | |||
174 | s->line = line_buf; | 169 | s->line = line_buf; |
175 | width += LCDFN(getstringsize)(" ", NULL, NULL); | 170 | width += LCDFN(getstringsize)(" ", NULL, NULL); |
176 | /* scroll forward the whole time */ | 171 | /* scroll forward the whole time */ |