From a576bbf0fcac82d4943b31488352a8e2d434e907 Mon Sep 17 00:00:00 2001 From: CEL Dev Team Date: Tue, 10 Nov 2026 21:31:52 -0800 Subject: [PATCH] No public description PiperOrigin-RevId: 1018824177 --- internal/utf8.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/utf8.cc b/internal/utf8.cc index 8cda91505..6ccf40d43 100644 --- a/internal/utf8.cc +++ b/internal/utf8.cc @@ -141,7 +141,7 @@ class CordReader final { } if (n <= buffer_.size() - index_) { // Enough data remaining in temporary buffer. - return absl::string_view(buffer_.data() + index_, n); + return absl::string_view(buffer_).substr(index_, n); } // We do not have enough data. See if we can fit it without allocating by // shifting data back to the beginning of the buffer. @@ -159,7 +159,7 @@ class CordReader final { size_t to_copy = n - (buffer_.size() - index_); absl::CopyCordToString(input_.Subcord(0, to_copy), &buffer_); input_.RemovePrefix(to_copy); - return absl::string_view(buffer_.data() + index_, n); + return absl::string_view(buffer_).substr(index_, n); } char Read() {