From f4ed72d2d7458a24632b4c9b4df8e8690c6af040 Mon Sep 17 00:00:00 2001 From: Dimiden Date: Thu, 14 Nov 2024 21:31:14 +0900 Subject: [PATCH] Fixed issue occurring when the passed length exceeds GetLength() --- src/projects/base/ovlibrary/data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/projects/base/ovlibrary/data.cpp b/src/projects/base/ovlibrary/data.cpp index 618d99374..2989b02a2 100644 --- a/src/projects/base/ovlibrary/data.cpp +++ b/src/projects/base/ovlibrary/data.cpp @@ -418,11 +418,11 @@ namespace ov String Data::ToHexString(size_t length) const { - return ov::ToHexString(GetDataAs(), length); + return ov::ToHexString(GetDataAs(), std::min(GetLength(), length)); } String Data::ToHexString() const { - return ToHexString(GetLength()); + return ov::ToHexString(GetDataAs(), GetLength()); } } // namespace ov \ No newline at end of file