Fixup for r217830. Don't do left shifts on negative values
llvm-svn: 217974
This commit is contained in:
parent
bf26f8fd56
commit
2c8ed4b84f
|
@ -103,7 +103,7 @@ inline int64_t decodeSLEB128(const uint8_t *p, unsigned *n = nullptr) {
|
|||
} while (Byte >= 128);
|
||||
// Sign extend negative numbers.
|
||||
if (Byte & 0x40)
|
||||
Value |= (-1LL) << Shift;
|
||||
Value |= (-1ULL) << Shift;
|
||||
if (n)
|
||||
*n = (unsigned)(p - orig_p);
|
||||
return Value;
|
||||
|
|
Loading…
Reference in New Issue