From d113dec8203116a12eb1a2903b5a01e7de604b52 Mon Sep 17 00:00:00 2001 From: Randolf J <34705014+jun-sheaf@users.noreply.github.com> Date: Sun, 2 Oct 2022 17:12:31 +0200 Subject: Update charconv.cc --- absl/strings/charconv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'absl') diff --git a/absl/strings/charconv.cc b/absl/strings/charconv.cc index 37d6f9f0..db2b392e 100644 --- a/absl/strings/charconv.cc +++ b/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(n_char_sequence)); n_char_sequence[nan_size] = '\0'; } char* nan_argument = const_cast(n_char_sequence); -- cgit v1.2.3