From cfc5d146d396c83666ffa059804374837b138de3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 13 Nov 2020 10:10:59 +0100 Subject: [PATCH] AK: Fix inverted condition in unsigned LEB128 decode --- AK/MemoryStream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/MemoryStream.h b/AK/MemoryStream.h index e8dc5c234cf..90bab32c428 100644 --- a/AK/MemoryStream.h +++ b/AK/MemoryStream.h @@ -108,7 +108,7 @@ public: const u8 byte = m_bytes[m_offset++]; result |= (byte & 0x7f) << shift; - if (byte & 0x80) + if ((byte & 0x80) == 0) break; shift += 7; }