From 7c2b3fb67158668e0f05ccefec428775057a8931 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 17 Feb 2016 11:44:44 +0000 Subject: [PATCH] [thin_delta] Fix bug when comparing the mappings --- thin-provisioning/thin_delta.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thin-provisioning/thin_delta.cc b/thin-provisioning/thin_delta.cc index 3b33c73..61f910f 100644 --- a/thin-provisioning/thin_delta.cc +++ b/thin-provisioning/thin_delta.cc @@ -432,7 +432,8 @@ namespace local { mapping left_mapping; mapping right_mapping; - while (left_it != left.end() && right_it != right.end()) { + while ((left_mapping.len_ || left_it != left.end()) && + (right_mapping.len_ || right_it != right.end())) { if (!left_mapping.len_ && left_it != left.end()) left_mapping = *left_it++;