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
This commit is contained in:
seife
2010-10-31 17:39:29 +00:00
parent b666fab10b
commit 9283bfa4e2

View File

@@ -267,6 +267,8 @@ void CDBoxInfoWidget::paint()
i++; i++;
if (i > 2) if (i > 2)
continue; 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); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width - 10, buffer, COL_MENUCONTENT);
ypos+= mheight; ypos+= mheight;
} }
@@ -308,7 +310,7 @@ void CDBoxInfoWidget::paint()
snprintf(ubuf,buf_size,"%d min, ", upminutes); snprintf(ubuf,buf_size,"%d min, ", upminutes);
strcat(sbuf, ubuf); 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[0]), LOAD_FRAC(info.loads[0]),
LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]), LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]),
LOAD_INT(info.loads[2]), LOAD_FRAC(info.loads[2])); LOAD_INT(info.loads[2]), LOAD_FRAC(info.loads[2]));