summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-08-01 17:48:38 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-08-01 17:48:38 +0000
commit73c283e969916b4ff918a7ff9ccb15038fb2ff18 (patch)
treee5ff3d1d80361b1b13bdf4f3f4a114cb9051e99a /apps
parentc5116a40e1cfd6dbe35544f8c15132a49d951a73 (diff)
Fix bug #5724 - Missing characters in text viewer, the number of characters in the line to display was calculated with a too wide character as reference
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10395 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/viewer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index 607d805693..e30f08defb 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -268,7 +268,7 @@ bool done = false;
int col = 0;
#define ADVANCE_COUNTERS(c) { width += glyph_width(c); k++; }
-#define LINE_IS_FULL ((k<MAX_COLUMNS-1) ||( width > draw_columns))
+#define LINE_IS_FULL ((k>=MAX_COLUMNS-1) ||( width >= draw_columns))
#define LINE_IS_NOT_FULL ((k<MAX_COLUMNS-1) &&( width < draw_columns))
static unsigned char* crop_at_width(const unsigned char* p)
{
@@ -741,7 +741,7 @@ static void viewer_draw(int col)
if (col != -1) {
scratch_buffer[k] = 0;
endptr = rb->iso_decode(scratch_buffer + col, utf8_buffer,
- prefs.encoding, draw_columns/glyph_width('a'));
+ prefs.encoding, draw_columns/glyph_width('i'));
*endptr = 0;
}
}