diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-08-01 17:48:38 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-08-01 17:48:38 +0000 |
commit | 73c283e969916b4ff918a7ff9ccb15038fb2ff18 (patch) | |
tree | e5ff3d1d80361b1b13bdf4f3f4a114cb9051e99a | |
parent | c5116a40e1cfd6dbe35544f8c15132a49d951a73 (diff) | |
download | rockbox-73c283e969916b4ff918a7ff9ccb15038fb2ff18.tar.gz rockbox-73c283e969916b4ff918a7ff9ccb15038fb2ff18.zip |
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
-rw-r--r-- | apps/plugins/viewer.c | 4 |
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; | |||
268 | int col = 0; | 268 | int col = 0; |
269 | 269 | ||
270 | #define ADVANCE_COUNTERS(c) { width += glyph_width(c); k++; } | 270 | #define ADVANCE_COUNTERS(c) { width += glyph_width(c); k++; } |
271 | #define LINE_IS_FULL ((k<MAX_COLUMNS-1) ||( width > draw_columns)) | 271 | #define LINE_IS_FULL ((k>=MAX_COLUMNS-1) ||( width >= draw_columns)) |
272 | #define LINE_IS_NOT_FULL ((k<MAX_COLUMNS-1) &&( width < draw_columns)) | 272 | #define LINE_IS_NOT_FULL ((k<MAX_COLUMNS-1) &&( width < draw_columns)) |
273 | static unsigned char* crop_at_width(const unsigned char* p) | 273 | static unsigned char* crop_at_width(const unsigned char* p) |
274 | { | 274 | { |
@@ -741,7 +741,7 @@ static void viewer_draw(int col) | |||
741 | if (col != -1) { | 741 | if (col != -1) { |
742 | scratch_buffer[k] = 0; | 742 | scratch_buffer[k] = 0; |
743 | endptr = rb->iso_decode(scratch_buffer + col, utf8_buffer, | 743 | endptr = rb->iso_decode(scratch_buffer + col, utf8_buffer, |
744 | prefs.encoding, draw_columns/glyph_width('a')); | 744 | prefs.encoding, draw_columns/glyph_width('i')); |
745 | *endptr = 0; | 745 | *endptr = 0; |
746 | } | 746 | } |
747 | } | 747 | } |