summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/textual.cc b/src/textual.cc
index 9ad62602..af208232 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -2027,10 +2027,12 @@ xact_t * instance_t::parse_xact(char * line,
previous_xact->get_tag("Hash")->to_string() : "");
if (xact->has_tag("Hash")) {
string current_hash = xact->get_tag("Hash")->to_string();
- if (expected_hash != current_hash) {
+ if (! std::equal(expected_hash.begin(),
+ expected_hash.begin() +
+ std::min(expected_hash.size(), current_hash.size()),
+ current_hash.begin()))
throw_(parse_error, _f("Expected hash %1% != %2%") %
expected_hash % current_hash);
- }
} else {
xact->set_tag("Hash", string_value(expected_hash));
}