From 9283bfa4e2b91f392a0cc826e717c6e88a0dbc7e Mon Sep 17 00:00:00 2001 From: seife Date: Sun, 31 Oct 2010 17:39:29 +0000 Subject: [PATCH] dboxinfo: remove extraneous '\n' (thanks TheDuke for reporting) git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@873 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/dboxinfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 047bb868d..717881a61 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -267,6 +267,8 @@ void CDBoxInfoWidget::paint() i++; if (i > 2) continue; + if (read > 0 && buffer[read-1] == '\n') + buffer[read-1] = '\0'; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width - 10, buffer, COL_MENUCONTENT); ypos+= mheight; } @@ -308,7 +310,7 @@ void CDBoxInfoWidget::paint() snprintf(ubuf,buf_size,"%d min, ", upminutes); strcat(sbuf, ubuf); - snprintf(ubuf,buf_size, "load: %ld.%02ld, %ld.%02ld, %ld.%02ld\n", + snprintf(ubuf,buf_size, "load: %ld.%02ld, %ld.%02ld, %ld.%02ld", LOAD_INT(info.loads[0]), LOAD_FRAC(info.loads[0]), LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]), LOAD_INT(info.loads[2]), LOAD_FRAC(info.loads[2]));