Fix issue where exact huffman code matches were missed

This commit is contained in:
Philip Heron 2011-06-24 20:56:32 +01:00
parent eb537bb22b
commit be051b1ae2
1 changed files with 1 additions and 1 deletions

2
ssdv.c
View File

@ -159,7 +159,7 @@ static inline char jpeg_dht_lookup(ssdv_t *s, uint8_t *symbol, uint8_t *width)
for(cw = 1; cw <= 16; cw++) for(cw = 1; cw <= 16; cw++)
{ {
/* Got enough bits? */ /* Got enough bits? */
if(cw >= s->worklen) return(SSDV_FEED_ME); if(cw > s->worklen) return(SSDV_FEED_ME);
/* Compare against each code 'cw' bits wide */ /* Compare against each code 'cw' bits wide */
for(n = dht[cw]; n > 0; n--) for(n = dht[cw]; n > 0; n--)