diff options
Diffstat (limited to 'libsanitizer')
-rw-r--r-- | libsanitizer/ubsan/ubsan_value.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsanitizer/ubsan/ubsan_value.cpp b/libsanitizer/ubsan/ubsan_value.cpp index 79c3ba991d3..40042bf3a90 100644 --- a/libsanitizer/ubsan/ubsan_value.cpp +++ b/libsanitizer/ubsan/ubsan_value.cpp @@ -74,7 +74,7 @@ SIntMax Value::getSIntValue() const { // to SIntMax. const unsigned ExtraBits = sizeof(SIntMax) * 8 - getType().getIntegerBitWidth(); - return SIntMax(Val) << ExtraBits >> ExtraBits; + return SIntMax(UIntMax(Val) << ExtraBits) >> ExtraBits; } if (getType().getIntegerBitWidth() == 64) return *reinterpret_cast<s64*>(Val); |