summaryrefslogtreecommitdiffstats
path: root/firmware/drivers
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-07-25 20:41:41 +0200
committerWilliam Wilgus <me.theuser@yahoo.com>2018-07-25 20:41:48 +0200
commit1054b5748ca2ad1fd598bb95312112f6568cb1dd (patch)
tree2f2bde489ff371eb72fa5fb23fcf2e6156d7a6d3 /firmware/drivers
parent7b5ce736db36e79d5bc4a0c60fb93bc8a7f54754 (diff)
downloadrockbox-1054b5748ca2ad1fd598bb95312112f6568cb1dd.tar.gz
rockbox-1054b5748ca2ad1fd598bb95312112f6568cb1dd.tar.bz2
rockbox-1054b5748ca2ad1fd598bb95312112f6568cb1dd.zip
Revert "Ignore truncation in lcd-scroll.c"
This reverts commit 540637ed3334364fe9d1b54cdc96a52f59afda83. Change-Id: I88e71ef47a11818a5acb407ff9c0723d3c197243
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-scroll.c9
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)
* Returns true if the text scrolled to the end */
bool LCDFN(scroll_now)(struct scrollinfo *s)
{
- int len;
int width = LCDFN(getstringsize)(s->linebuffer, NULL, NULL);
bool ended = false;
/* assume s->scroll_func() don't yield; otherwise this buffer might need
@@ -165,12 +164,8 @@ bool LCDFN(scroll_now)(struct scrollinfo *s)
}
else
{
- len = snprintf(line_buf, sizeof(line_buf)-1, "%s%s%s",
- s->linebuffer, " ", s->linebuffer);
-
- if ((unsigned) len > sizeof(line_buf))
- do { } while (0); /* ignore truncation */
-
+ snprintf(line_buf, sizeof(line_buf)-1, "%s%s%s",
+ s->linebuffer, " ", s->linebuffer);
s->line = line_buf;
width += LCDFN(getstringsize)(" ", NULL, NULL);
/* scroll forward the whole time */