From 2701ee1bcfe28449a58be93ba044448d3089d387 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 14 Sep 2005 09:20:02 +0000 Subject: [PATCH] out[-pos] need not equal *(out-pos) if pointers are 64-bit and pos is 32-bit. --- lib/lizard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.2