Update charconv.cc

pull/1285/head
Randolf J 2 years ago committed by GitHub
parent 7f3c0d7811
commit d113dec820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      absl/strings/charconv.cc

@ -347,7 +347,7 @@ bool HandleEdgeCase(const strings_internal::ParsedFloat& input, bool negative,
} else {
ptrdiff_t nan_size = input.subrange_end - input.subrange_begin;
nan_size = std::min(nan_size, kNanBufferSize - 1);
std::copy_n(input.subrange_begin, nan_size, n_char_sequence);
std::copy_n(input.subrange_begin, nan_size, const_cast<char *>(n_char_sequence));
n_char_sequence[nan_size] = '\0';
}
char* nan_argument = const_cast<char*>(n_char_sequence);

Loading…
Cancel
Save