Previous 199869 Revisions Next

r20668 Saturday 2nd February, 2013 at 12:16:22 UTC by Oliver Stöneberg
fixed undefined behavior in bitstream_out::write() as well - thanks to -fcatch-undefined-behavior and clang (nw)
[src/lib/util]bitstream.h

trunk/src/lib/util/bitstream.h
r20667r20668
237237      }
238238
239239   // shift the bits to the top
240   newbits <<= 32 - numbits;
240   if (numbits == 0)
241      newbits = 0;
242   else
243      newbits <<= 32 - numbits;
241244
242245   // now shift it down to account for the number of bits we already have and OR them in
243246   m_buffer |= newbits >> m_bits;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team