diff options
Diffstat (limited to 'converter/pbm/g3topbm.c')
-rw-r--r-- | converter/pbm/g3topbm.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/converter/pbm/g3topbm.c b/converter/pbm/g3topbm.c index 5d98fcb2..5db507a3 100644 --- a/converter/pbm/g3topbm.c +++ b/converter/pbm/g3topbm.c @@ -552,12 +552,11 @@ readFaxRow(struct BitStream * const bitStreamP, curcode = (curcode << 1) | bit; ++curlen; - if (curlen > 11 && curcode == 0x00) { - if (++fillbits > MAXFILLBITS) - pm_error("Encountered %u consecutive fill bits. " - "Aborting", fillbits); - } - else if (curlen - fillbits > 13) { + if (curlen > 11 && curcode == 0x00) { + if (++fillbits > MAXFILLBITS) + pm_error("Encountered %u consecutive fill bits. " + "Aborting", fillbits); + } else if (curlen - fillbits > 13) { formatBadCodeException(exceptionP, col, curlen, curcode); done = TRUE; } else if (curcode != 0) { |