Commit 22616198 authored by Bernhard Link's avatar Bernhard Link

fix corner case in patch merging

parent c039d60c
......@@ -465,6 +465,8 @@ retvalue combine_patches(struct modification **result_p, /*@only@*/struct modifi
move_queue(&last, &result, &a);
/* and reduce the number of lines of *p */
modification_stripstartlines(p, removedlines);
/* p->newlinecount got smaller, so less will be deleted later */
lineofs -= removedlines;
assert( p->oldlinestart >= last->oldlinestart + last->oldlinecount);
if( a != NULL )
assert( lineofs + a->oldlinestart >= last->oldlinestart + last->oldlinecount);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment