diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index 1459aee4fa9..f72b629e727 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc @@ -11499,7 +11499,7 @@ static intptr_t DecodeSLEB128(const uint8_t* data, } while ((part & 0x80) != 0); if ((shift < (sizeof(value) * 8)) && ((part & 0x40) != 0)) { - value |= static_cast(-1) << shift; + value |= static_cast(kUwordMax << shift); } return value; }