diff --git a/frozen/string.h b/frozen/string.h index bf44868c..cad92bbe 100644 --- a/frozen/string.h +++ b/frozen/string.h @@ -62,7 +62,12 @@ template class basic_string { constexpr chr_t operator[](std::size_t i) const { return data_[i]; } constexpr bool operator==(basic_string other) const { - return std::memcmp(data_, other.data_, size_) == 0; + if (size_ != other.size_) + return false; + for (std::size_t i = 0; i < size_; ++i) + if (data_[i] != other.data_[i]) + return false; + return true; } constexpr bool operator<(const basic_string &other) const {