# HG changeset patch # User John W. Eaton # Date 1236892094 14400 # Node ID d1eab3ddb02d054b7e598f9cb520e2e69e82b67a # Parent 985792c9e0dad1de126058054e13b5fa102e9f86 oct-inttypes.h (bitshift): apply mask even if not shifting diff -r 985792c9e0da -r d1eab3ddb02d liboctave/ChangeLog --- a/liboctave/ChangeLog Thu Mar 12 12:45:38 2009 -0400 +++ b/liboctave/ChangeLog Thu Mar 12 17:08:14 2009 -0400 @@ -1,3 +1,8 @@ +2009-03-12 John W. Eaton + + * oct-inttypes.h (bitshift): Apply mask even if not shifting. + From Seb Astien . + 2009-03-11 Jaroslav Hajek * PermMatrix.cc (PermMatrix::power): New method. diff -r 985792c9e0da -r d1eab3ddb02d liboctave/oct-inttypes.h --- 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 octave_int8;