fbpad: cast the return value to unsigned char in readchar()
authorAli Gholami Rudi <ali@rudi.ir>
Sat, 28 Sep 2013 15:21:53 +0000 (28 18:51 +0330)
committerAli Gholami Rudi <ali@rudi.ir>
Sat, 28 Sep 2013 15:21:53 +0000 (28 18:51 +0330)
fbpad.c

diff --git a/fbpad.c b/fbpad.c
index 0826052..892909c 100644 (file)
--- a/fbpad.c
+++ b/fbpad.c
@@ -43,7 +43,7 @@ static int readchar(void)
 {
        char b;
        if (read(0, &b, 1) > 0)
-               return (int) b;
+               return (unsigned char) b;
        return -1;
 }