about summary refs log tree commit diff
path: root/editor/pnmpaste.c
diff options
context:
space:
mode:
Diffstat (limited to 'editor/pnmpaste.c')
-rw-r--r--editor/pnmpaste.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/pnmpaste.c b/editor/pnmpaste.c
index 0cd9b23b..a47e1d66 100644
--- a/editor/pnmpaste.c
+++ b/editor/pnmpaste.c
@@ -125,7 +125,7 @@ rightBits(unsigned char const x,
 -----------------------------------------------------------------------------*/
     assert(n <= 8);
 
-    return (x << (8-n)) >> (8-n);
+    return ((unsigned char)(x << (8-n))) >> (8-n);
 }