diff --git a/readbc.lua b/readbc.lua index dc775b0..c305113 100644 --- a/readbc.lua +++ b/readbc.lua @@ -53,6 +53,7 @@ local function read_uleb128(fp) while not last_byte do local uleb_byte = read_u8(fp) res = bit.bor(res, bit.lshift(bit.band(uleb_byte, 0x7f), shift)) + shift = shift + 7 if bit.band(uleb_byte, 0x80) == 0 then last_byte = true