]> mj.ucw.cz Git - libucw.git/commitdiff
out[-pos] need not equal *(out-pos) if pointers are 64-bit and pos is 32-bit.
authorMartin Mares <mj@ucw.cz>
Wed, 14 Sep 2005 09:20:02 +0000 (09:20 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 14 Sep 2005 09:20:02 +0000 (09:20 +0000)
lib/lizard.c

index 6167fee043ba90c07befef746cd6bd917c5c21d7..b9f80486e45d0648c5ad0c2e3409eff005a6656b 100644 (file)
@@ -380,7 +380,8 @@ lizard_decompress(byte *in, byte *out)
     else
     {                                          /* overlapping */
       for (; len-- > 0; out++)
-       *out = out[-pos];
+       *out = *(out-pos);
+      /* It's tempting to use out[-pos] above, but unfortunately it's not the same */
     }
     /* extract the copy-bits */
     len = in[-2] & 0x3;