diff options
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/stubs/strutil.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/strutil.cc b/src/google/protobuf/stubs/strutil.cc index 336894b5..1a4d71c8 100644 --- a/src/google/protobuf/stubs/strutil.cc +++ b/src/google/protobuf/stubs/strutil.cc @@ -1401,7 +1401,7 @@ char* FloatToBuffer(float value, char* buffer) { float parsed_value; if (!safe_strtof(buffer, &parsed_value) || parsed_value != value) { int snprintf_result = - snprintf(buffer, kFloatToBufferSize, "%.*g", FLT_DIG+2, value); + snprintf(buffer, kFloatToBufferSize, "%.*g", FLT_DIG+3, value); // Should never overflow; see above. GOOGLE_DCHECK(snprintf_result > 0 && snprintf_result < kFloatToBufferSize); |