From be051b1ae2b2e9dd0063e00877fcaca7896a575f Mon Sep 17 00:00:00 2001 From: Philip Heron Date: Fri, 24 Jun 2011 20:56:32 +0100 Subject: [PATCH] Fix issue where exact huffman code matches were missed --- ssdv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssdv.c b/ssdv.c index acc6c40..56a2309 100644 --- a/ssdv.c +++ b/ssdv.c @@ -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++) { /* 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 */ for(n = dht[cw]; n > 0; n--)