]> Sergey Matveev's repositories - st.git/blobdiff - st.c
avoid potential UB when using isprint()
[st.git] / st.c
diff --git a/st.c b/st.c
index c71fa0677ee40d7ba71b5b67fbb70b4386500be8..1307fdf4ab3afee8d16af827b1a04a99152cf1ec 100644 (file)
--- a/st.c
+++ b/st.c
@@ -367,7 +367,7 @@ static const char base64_digits[] = {
 char
 base64dec_getc(const char **src)
 {
-       while (**src && !isprint(**src))
+       while (**src && !isprint((unsigned char)**src))
                (*src)++;
        return **src ? *((*src)++) : '=';  /* emulate padding if string ends */
 }