mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fixup for r217830. Don't do left shifts on negative values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user