From: Martin Mares Date: Wed, 14 Sep 2005 09:20:02 +0000 (+0000) Subject: out[-pos] need not equal *(out-pos) if pointers are 64-bit and pos is 32-bit. X-Git-Tag: holmes-import~742 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2701ee1bcfe28449a58be93ba044448d3089d387;p=libucw.git out[-pos] need not equal *(out-pos) if pointers are 64-bit and pos is 32-bit. --- diff --git a/lib/lizard.c b/lib/lizard.c index 6167fee0..b9f80486 100644 --- a/lib/lizard.c +++ b/lib/lizard.c @@ -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;