diff options
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/viewer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index e8d6116..cefc83b 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) if (offset == 0 && prefs.encoding == UTF_8 && is_bom) rb->lseek(fd, BOM_SIZE, SEEK_SET); - numread = rb->read(fd, buf, size); + numread = rb->read(fd, buf, size - 1); buf[numread] = 0; rb->button_clear_queue(); /* clear button queue */ |