Ignore:
Timestamp:
12/20/06 20:42:30 (17 years ago)
Author:
r2d
Message:
  • bugfix
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/libmpcdec/mpc_bits_reader.c

    r172 r179  
    106106{ 0, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31};
    107107
     108// FIXME : make it work without 64 bit use for 32 bit output
    108109mpc_uint32_t mpc_bits_read(mpc_bits_reader * r, const unsigned int nb_bits)
    109110{
    110         mpc_uint32_t ret = r->buff[0];
     111        mpc_uint64_t ret = r->buff[0];
    111112
    112113        while(nb_bits > r->count){
     
    118119        r->count -= nb_bits;
    119120
    120         return (ret >> r->count) & (-1u >> (32 - nb_bits));
     121        return (mpc_uint32_t)((ret >> r->count) & (-1u >> (32 - nb_bits)));
    121122}
    122123
Note: See TracChangeset for help on using the changeset viewer.