summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
268int col = 0; 268int 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))
273static unsigned char* crop_at_width(const unsigned char* p) 273static 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 }