Skip to content

Commit

Permalink
Merge pull request #233 from LLNL/hotfix/bjson_string_comp
Browse files Browse the repository at this point in the history
Bugfix: Boost JSON string comparison
  • Loading branch information
KIwabuchi committed Sep 3, 2022
2 parents e3c4313 + 413a0a4 commit c47a83e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/metall/container/experimental/json/value.hpp
Expand Up @@ -52,7 +52,10 @@ inline bool general_value_equal(const value<allocator_type> &value, const other_
} else if (other_value.is_array()) {
return value.is_array() && (value.as_array() == other_value.as_array());
} else if (other_value.is_string()) {
return value.is_string() && (value.as_string() == other_value.as_string());
if (!value.is_string()) return false;
const auto& str = value.as_string();
const auto& other_srt = other_value.as_string();
return str.compare(other_srt.c_str()) == 0;
}

assert(false);
Expand Down

0 comments on commit c47a83e

Please sign in to comment.