Start fixing implicit truncations
[folly.git] / folly / experimental / bser / Dump.cpp
index ae820af2b9abf8d6a5ce4352cca929877145c7b2..078438d9c10a2cf4cb33eded66d4691778be5bb0 100644 (file)
@@ -198,7 +198,7 @@ std::unique_ptr<folly::IOBuf> toBserIOBuf(folly::dynamic const& dyn,
 
   // compute the length
   auto len = q.chainLength();
-  if (len > std::numeric_limits<int64_t>::max()) {
+  if (len > uint64_t(std::numeric_limits<int64_t>::max())) {
     throw std::range_error(folly::to<std::string>(
         "serialized data size ", len, " is too large to represent as BSER"));
   }