Fix bug in new invariant

This commit is contained in:
Ed Hennis
2025-03-19 21:04:01 -04:00
parent 34f7bc7502
commit 145215d4ab

View File

@@ -1602,12 +1602,13 @@ NoModifiedUnmodifiableFields::finalize(
ReadView const& view, ReadView const& view,
beast::Journal const& j) beast::Journal const& j)
{ {
static auto const fieldChanged = [](auto const& before, static auto const fieldChanged =
auto const& after, [](auto const& before, auto const& after, auto const& field) {
auto const& field) { bool const beforeField = before->isFieldPresent(field);
return before->isFieldPresent(field) != after->isFieldPresent(field) || bool const afterField = after->isFieldPresent(field);
before->at(field) != after->at(field); return beforeField != afterField ||
}; (afterField && before->at(field) != after->at(field));
};
for (auto const& slePair : changedEntries_) for (auto const& slePair : changedEntries_)
{ {
auto const& before = slePair.first; auto const& before = slePair.first;