Skip to content

Commit

Permalink
fix(StringContent): compareString problem
Browse files Browse the repository at this point in the history
strcmp returns wrong result
  • Loading branch information
mcakircali committed Dec 21, 2024
1 parent 3c29ecf commit 042667c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eckit/value/StringContent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int StringContent::compare(const Content& other) const {
}

int StringContent::compareString(const StringContent& other) const {
return ::strcmp(value_.c_str(), other.value_.c_str());
return value_.compare(other.value_);
}

void StringContent::value(std::string& s) const {
Expand Down

0 comments on commit 042667c

Please sign in to comment.