aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/json_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/util/json_util.cc')
-rw-r--r--src/google/protobuf/util/json_util.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/google/protobuf/util/json_util.cc b/src/google/protobuf/util/json_util.cc
index ce3569ce..e917ecc4 100644
--- a/src/google/protobuf/util/json_util.cc
+++ b/src/google/protobuf/util/json_util.cc
@@ -50,7 +50,8 @@ namespace util {
namespace internal {
ZeroCopyStreamByteSink::~ZeroCopyStreamByteSink() {
- stream_->BackUp(buffer_size_);
+ if (buffer_size_ > 0)
+ stream_->BackUp(buffer_size_);
}
void ZeroCopyStreamByteSink::Append(const char* bytes, size_t len) {