🚨 fix UBSAN warning

This commit is contained in:
Niels Lohmann 2020-07-23 14:06:09 +02:00
parent bba57cc4af
commit 0cd120f7e1
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69

View file

@ -515,7 +515,7 @@ TEST_CASE("MessagePack")
(static_cast<uint32_t>(result[2]) << 020) +
(static_cast<uint32_t>(result[3]) << 010) +
static_cast<uint32_t>(result[4]);
CHECK(restored == i);
CHECK(static_cast<std::int32_t>(restored) == i);
// roundtrip
CHECK(json::from_msgpack(result) == j);