diff --git a/BAN/BAN/String.cpp b/BAN/BAN/String.cpp index 9644f634..6b49b9d5 100644 --- a/BAN/BAN/String.cpp +++ b/BAN/BAN/String.cpp @@ -4,8 +4,6 @@ #include #include -#include - #include #include #include @@ -143,9 +141,7 @@ namespace BAN bool String::operator==(const char* other) const { - if (m_size != strlen(other)) - return false; - return memcmp(m_data, other, m_size) == 0; + return memcmp(m_data, other, m_size + 1) == 0; } ErrorOr String::Resize(size_type size, char ch) diff --git a/BAN/BAN/StringView.cpp b/BAN/BAN/StringView.cpp index b86d78c7..02c751d9 100644 --- a/BAN/BAN/StringView.cpp +++ b/BAN/BAN/StringView.cpp @@ -45,9 +45,7 @@ namespace BAN bool StringView::operator==(const char* other) const { - if (m_size != strlen(other)) - return false; - return memcmp(m_data, other, m_size) == 0; + return memcmp(m_data, other, m_size + 1) == 0; } StringView StringView::Substring(size_type index, size_type len) const diff --git a/kernel/Makefile b/kernel/Makefile index 177db3b2..d947fd2d 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -38,6 +38,7 @@ kernel/PIC.o \ kernel/PIT.o \ kernel/RTC.o \ kernel/Serial.o \ +kernel/Shell.o \ kernel/SSP.o \ icxxabi.o \