From de7e58c274d433769d0b3f9c09990879e94ffed2 Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 21 Jul 2023 14:26:54 +0200 Subject: [PATCH] StringView: Fix equality operator --- libluna/src/StringView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libluna/src/StringView.cpp b/libluna/src/StringView.cpp index dad5eaa8..04f0db6b 100644 --- a/libluna/src/StringView.cpp +++ b/libluna/src/StringView.cpp @@ -50,12 +50,12 @@ const char& StringView::operator[](usize index) const bool StringView::operator==(const char* other) const { - return !strncmp(m_string, other, m_length); + return !strcmp(m_string, other); } bool StringView::operator==(StringView other) const { - return !strncmp(m_string, other.m_string, m_length); + return !strcmp(m_string, other.m_string); } Result> StringView::split(StringView delim) const