diff options
-rw-r--r-- | AK/FlyString.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/AK/FlyString.cpp b/AK/FlyString.cpp index 36f5c8a241..c537ac14e6 100644 --- a/AK/FlyString.cpp +++ b/AK/FlyString.cpp @@ -118,7 +118,11 @@ bool FlyString::operator==(const StringView& string) const bool FlyString::operator==(const char* string) const { - return String(string) == String(m_impl.ptr()); + if (is_null()) + return !string; + if (!string) + return false; + return !__builtin_strcmp(m_impl->characters(), string); } } |