diff --git a/src/sp/common/VarInt.cpp b/src/sp/common/VarInt.cpp index db62d06..534a94d 100644 --- a/src/sp/common/VarInt.cpp +++ b/src/sp/common/VarInt.cpp @@ -5,8 +5,8 @@ namespace sp { -static constexpr int SEGMENT_BITS = 0x7F; -static constexpr int CONTINUE_BIT = 0x80; +static constexpr int SEGMENT_BITS = (1 << 7) - 1; +static constexpr int CONTINUE_BIT = 1 << 7; std::size_t VarInt::GetSerializedLength() const { DataBuffer buffer;