From 7cceff870808cee26ce5cfeca458802d3fa9d192 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 10 Mar 2016 20:41:11 +0100 Subject: [PATCH] fix logic bug in existing tree diff applicator this one went through unnoticed, because the situation is not covered in unit-test. The tests written thus fare are more like a proof-of-concept. I didn't want to spend weeks on writing extensive coverage of all corner cases, at least not before all aspects of the tree diff protocol are settled. Seemingly this backfires already --- src/lib/diff/tree-diff-application.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/diff/tree-diff-application.hpp b/src/lib/diff/tree-diff-application.hpp index 3914da1d2..70b18554c 100644 --- a/src/lib/diff/tree-diff-application.hpp +++ b/src/lib/diff/tree-diff-application.hpp @@ -371,7 +371,10 @@ namespace diff{ __expect_successful_location(n); if (not endOfData() and srcPos()->matches(n)) - ++src(); // get /after/ an explicitly given position + { + move_into_new_sequence (srcPos()); + ++src(); // get /after/ an explicitly given position + } } /** assignement of changed value in one step */