From 99e8d754409579303b153789c7388105e15b0f86 Mon Sep 17 00:00:00 2001 From: aolo2 Date: Sun, 11 Jul 2021 21:37:08 +0300 Subject: [PATCH] Fix typo in decode_leb128s --- dwarf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dwarf.c b/dwarf.c index e5a0cff..c3d5a91 100644 --- a/dwarf.c +++ b/dwarf.c @@ -80,17 +80,14 @@ decode_leb128s(u8 *at, s32 *dest) while (1) { byte = at[offset++]; - result |= ((byte & 127) << shift); - + shift += 7; if ((byte & 128) == 0) { break; } - - shift += 7; } - if ((shift < size) && (byte & 128)) { + if ((shift < size) && (byte & 64)) { result |= -(1 << shift); }