]> granicus.if.org Git - procps-ng/commitdiff
Watch uses unsigned chars to be 8bit clean
authorCraig Small <csmall@enc.com.au>
Mon, 28 Nov 2011 11:39:09 +0000 (22:39 +1100)
committerCraig Small <csmall@enc.com.au>
Mon, 28 Nov 2011 11:39:09 +0000 (22:39 +1100)
Taken from the Debian patch watch_8bitchar

watch.c

diff --git a/watch.c b/watch.c
index 1e050dc6f81dd7ae4306e411024dfa5a7d79e57a..af7d2620039f0dbd487fc8176054efa5eef05e63 100644 (file)
--- a/watch.c
+++ b/watch.c
@@ -296,9 +296,9 @@ main(int argc, char *argv[])
                                move(y, x);
                                if (option_differences) {
                                        chtype oldch = inch();
-                                       char oldc = oldch & A_CHARTEXT;
+                                       unsigned char oldc = oldch & A_CHARTEXT;
                                        attr = !first_screen
-                                           && ((char)c != oldc
+                                           && ((unsigned char)c != oldc
                                                ||
                                                (option_differences_cumulative
                                                 && (oldch & A_ATTRIBUTES)));