Changeset 15627


Ignore:
Timestamp:
05/16/13 17:37:44 (12 years ago)
Author:
lyard
Message:
bugFix
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/huffman.h

    r14795 r15627  
    178178        Encoder(const uint16_t *bufin, size_t bufinlen) : count(0)
    179179        {
    180             uint16_t counts[MAX_SYMBOLS];
    181             memset(counts, 0, sizeof(uint16_t)*MAX_SYMBOLS);
     180            uint64_t counts[MAX_SYMBOLS];
     181            memset(counts, 0, sizeof(uint64_t)*MAX_SYMBOLS);
    182182
    183183            // Count occurances
     
    281281        {
    282282            Decoder const *p = this;
     283
     284            if (in_ptr==in_end)
     285            {
     286                while (out_ptr < out_end)
     287                    *out_ptr++ = p->lut->symbol;
     288                return in_ptr;
     289            }
    283290
    284291            uint8_t curbit = 0;
Note: See TracChangeset for help on using the changeset viewer.