| 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 |
| r20667 | r20668 | |
|---|---|---|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | // shift the bits to the top |
| 240 | newbits <<= 32 - numbits; | |
| 240 | if (numbits == 0) | |
| 241 | newbits = 0; | |
| 242 | else | |
| 243 | newbits <<= 32 - numbits; | |
| 241 | 244 | |
| 242 | 245 | // now shift it down to account for the number of bits we already have and OR them in |
| 243 | 246 | m_buffer |= newbits >> m_bits; |
| Previous | 199869 Revisions | Next |