From 8bad5e434674e3f90a906c9b3f53fe4be70a6c43 Mon Sep 17 00:00:00 2001
From: Patrick Wuttke
Date: Thu, 27 Mar 2025 15:07:17 +0100
Subject: [PATCH] Fixed stars- and endsWithIgnoreCase.
---
source/mijin/util/string.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/mijin/util/string.hpp b/source/mijin/util/string.hpp
index 8a3704b..05540d8 100644
--- a/source/mijin/util/string.hpp
+++ b/source/mijin/util/string.hpp
@@ -402,7 +402,7 @@ inline auto findIgnoreCase(std::string_view haystack, std::string_view needle)
[[nodiscard]]
inline bool startsWithIgnoreCase(std::string_view string, std::string_view part)
{
- if (part.size() > part.size())
+ if (part.size() > string.size())
{
return false;
}
@@ -412,7 +412,7 @@ inline bool startsWithIgnoreCase(std::string_view string, std::string_view part)
[[nodiscard]]
inline bool endsWithIgnoreCase(std::string_view string, std::string_view part)
{
- if (part.size() > part.size())
+ if (part.size() > string.size())
{
return false;
}