From 3ee24bca497fc44eb39b64781ae7d433a327aeb3 Mon Sep 17 00:00:00 2001 From: Denis Smirnov Date: Fri, 3 May 2019 19:52:46 +0700 Subject: [PATCH] should close protocolbuffers#6095 --- src/google/protobuf/parse_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h index 5c8f986c1..9314993b8 100644 --- a/src/google/protobuf/parse_context.h +++ b/src/google/protobuf/parse_context.h @@ -125,7 +125,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream { // If return value is negative it's an error PROTOBUF_MUST_USE_RESULT int PushLimit(const char* ptr, int limit) { GOOGLE_DCHECK(limit >= 0); - limit += ptr - buffer_end_; + limit += static_cast(ptr - buffer_end_); limit_end_ = buffer_end_ + (std::min)(0, limit); auto old_limit = limit_; limit_ = limit;