Browse Source

should close protocolbuffers#6095

Denis Smirnov 6 years ago
parent
commit
3ee24bca49
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/google/protobuf/parse_context.h

+ 1 - 1
src/google/protobuf/parse_context.h

@@ -125,7 +125,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
   // If return value is negative it's an error
   // If return value is negative it's an error
   PROTOBUF_MUST_USE_RESULT int PushLimit(const char* ptr, int limit) {
   PROTOBUF_MUST_USE_RESULT int PushLimit(const char* ptr, int limit) {
     GOOGLE_DCHECK(limit >= 0);
     GOOGLE_DCHECK(limit >= 0);
-    limit += ptr - buffer_end_;
+    limit += static_cast<int>(ptr - buffer_end_);
     limit_end_ = buffer_end_ + (std::min)(0, limit);
     limit_end_ = buffer_end_ + (std::min)(0, limit);
     auto old_limit = limit_;
     auto old_limit = limit_;
     limit_ = limit;
     limit_ = limit;