From cc24978ea589effa8374dde971ef8338f09fdd8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 3 Aug 2017 08:41:08 +0200 Subject: [PATCH] Fix broken assert in decode_chunk_repeat --- src/openrct2/util/sawyercoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/util/sawyercoding.c b/src/openrct2/util/sawyercoding.c index 2ba4213bd7..70cfb4fe34 100644 --- a/src/openrct2/util/sawyercoding.c +++ b/src/openrct2/util/sawyercoding.c @@ -288,7 +288,7 @@ static size_t decode_chunk_repeat(uint8 *buffer, size_t length, size_t dstLength count = (src[i] & 7) + 1; copyOffset = dst + (sint32)(src[i] >> 3) - 32; assert(dst + count < buffer + dstLength); - assert(copyOffset + count < src + length); + assert(copyOffset + count < buffer + dstLength); memcpy(dst, copyOffset, count); dst = (uint8*)((uintptr_t)dst + count); }