summaryrefslogtreecommitdiff
path: root/apps/plugins/viewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/viewer.c')
-rw-r--r--apps/plugins/viewer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index e8d6116eb6..cefc83beb2 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -1011,7 +1011,7 @@ static void fill_buffer(long pos, unsigned char* buf, unsigned size)
1011 if (offset == 0 && prefs.encoding == UTF_8 && is_bom) 1011 if (offset == 0 && prefs.encoding == UTF_8 && is_bom)
1012 rb->lseek(fd, BOM_SIZE, SEEK_SET); 1012 rb->lseek(fd, BOM_SIZE, SEEK_SET);
1013 1013
1014 numread = rb->read(fd, buf, size); 1014 numread = rb->read(fd, buf, size - 1);
1015 buf[numread] = 0; 1015 buf[numread] = 0;
1016 rb->button_clear_queue(); /* clear button queue */ 1016 rb->button_clear_queue(); /* clear button queue */
1017 1017