]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 481: fix off-by-one line counting error
authorLee Howard <faxguy@howardsilvan.com>
Thu, 11 Dec 2003 18:43:32 +0000 (18:43 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Thu, 11 Dec 2003 18:43:32 +0000 (18:43 +0000)
faxd/G3Decoder.c++

index eb3cacbbba66b18fa2b2ccbb9535f8ed13e893bb..f06854870cd753658cfe7e7b80400b867a76fec8 100644 (file)
@@ -217,7 +217,7 @@ G3Decoder::decodeRow(void* scanline, u_int lastx)
        b1 = *pb++;
 #define        badlength(a0,lastx) do {                        \
     if (isG4)                                          \
-       RTCrow = rowref-1;                              \
+       RTCrow = rowref;                                \
     badPixelCount("2D", a0, lastx);                    \
     rowgood = false;                                   \
 } while (0)
@@ -228,7 +228,7 @@ G3Decoder::decodeRow(void* scanline, u_int lastx)
 #define        badlength(a0,lastx) do {                        \
     nullrow = (a0 == 0);                               \
     if (nullrow && ++RTCrun == 5 && RTCrow == -1)      \
-       RTCrow = rowref-5;                              \
+       RTCrow = rowref-4;                              \
     badPixelCount("1D", a0, lastx);                    \
     rowgood = false;                                   \
 } while (0)