diff liboctave/oct-inttypes.h @ 8963:d1eab3ddb02d

oct-inttypes.h (bitshift): apply mask even if not shifting
author John W. Eaton <jwe@octave.org>
date Thu, 12 Mar 2009 17:08:14 -0400
parents d865363208d6
children 0631d397fbe0
line wrap: on
line diff
--- a/liboctave/oct-inttypes.h	Thu Mar 12 12:45:38 2009 -0400
+++ b/liboctave/oct-inttypes.h	Thu Mar 12 17:08:14 2009 -0400
@@ -963,7 +963,7 @@
   else if (n < 0)
     return (a >> -n) & mask;
   else
-    return a;
+    return a & mask;
 }
 
 typedef octave_int<int8_t> octave_int8;