Ignore truncation in lcd-scroll.c

Change-Id: Id1008300e58cf12ab920c1023354a74a6d32daae
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c
index 0e17303..dd6a6fe 100644
--- a/firmware/drivers/lcd-scroll.c
+++ b/firmware/drivers/lcd-scroll.c
@@ -140,6 +140,7 @@
  * 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
@@ -164,8 +165,12 @@
     }
     else
     {
-        snprintf(line_buf, sizeof(line_buf)-1, "%s%s%s",
-            s->linebuffer, "   ", s->linebuffer);
+        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 */
+
         s->line = line_buf;
         width += LCDFN(getstringsize)("   ", NULL, NULL);
         /* scroll forward the whole time */