diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-09-23 10:07:16 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-09-23 10:07:16 -0700 |
commit | 04456843cdc05935abecb3c0b607d6053d27d865 (patch) | |
tree | dfa0a0013ae9874b10689926380734911d5153ba /src/cpp/proto | |
parent | f4fc5d2bfd9b9c20d7a0d9d936679d2c1602ebcf (diff) |
Windows fixes
Diffstat (limited to 'src/cpp/proto')
-rw-r--r-- | src/cpp/proto/proto_utils.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index be84c222a0..f47acc8f8d 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.cc @@ -36,6 +36,7 @@ #include <grpc/grpc.h> #include <grpc/byte_buffer.h> #include <grpc/byte_buffer_reader.h> +#include <grpc/support/log.h> #include <grpc/support/slice.h> #include <grpc/support/slice_buffer.h> #include <grpc/support/port_platform.h> @@ -111,7 +112,8 @@ class GrpcBufferReader GRPC_FINAL if (backup_count_ > 0) { *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - backup_count_; - *size = backup_count_; + GPR_ASSERT(backup_count_ <= INT_MAX); + *size = (int)backup_count_; backup_count_ = 0; return true; } |