forked from len0rd/rockbox
Revert "Ignore truncation in lcd-scroll.c"
This reverts commit 540637ed33
.
Change-Id: I88e71ef47a11818a5acb407ff9c0723d3c197243
This commit is contained in:
parent
7b5ce736db
commit
1054b5748c
1 changed files with 2 additions and 7 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue