From fdc094324dc1439b08cfe3df417579085009a849 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 19 Sep 2015 21:17:50 +0300 Subject: [PATCH] mcview: zero extension of char to int. Signed-off-by: Andrew Borodin --- src/viewer/datasource.c | 2 +- src/viewer/growbuf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viewer/datasource.c b/src/viewer/datasource.c index c4be5257c..6080a5212 100644 --- a/src/viewer/datasource.c +++ b/src/viewer/datasource.c @@ -248,7 +248,7 @@ mcview_get_byte_string (WView * view, off_t byte_index, int *retval) return FALSE; if (retval != NULL) - *retval = *p; + *retval = (unsigned char) (*p); return TRUE; } diff --git a/src/viewer/growbuf.c b/src/viewer/growbuf.c index 7987b73cd..9ed81a9bf 100644 --- a/src/viewer/growbuf.c +++ b/src/viewer/growbuf.c @@ -268,7 +268,7 @@ mcview_get_byte_growing_buffer (WView * view, off_t byte_index, int *retval) return FALSE; if (retval != NULL) - *retval = *p; + *retval = (unsigned char) (*p); return TRUE; }