[ox/std] Fix possible false positive in HashMap::operator==
All checks were successful
Build / build (push) Successful in 1m13s
All checks were successful
Build / build (push) Successful in 1m13s
This commit is contained in:
4
deps/ox/src/ox/std/hashmap.hpp
vendored
4
deps/ox/src/ox/std/hashmap.hpp
vendored
@@ -109,7 +109,9 @@ constexpr bool HashMap<K, T>::operator==(HashMap const &other) const {
|
||||
for (auto &k : m_keys) {
|
||||
auto const a = at(k).value;
|
||||
auto const b = other.at(k).value;
|
||||
if (a && b && *a != *b) {
|
||||
if (
|
||||
a != b && // handle one being null and other not
|
||||
(a && b && *a != *b)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user