xdl_change_compact(): fix compaction heuristic to adjust ixo
[gitweb.git] / xdiff / xdiffi.c
index b3c684887502c3c473a614114e4acdfbc57ea094..95b037ee38fdea4e007b825f9619a0b6760d195d 100644 (file)
@@ -528,6 +528,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
                               recs_match(recs, ixs - 1, ix - 1, flags)) {
                                rchg[--ixs] = 1;
                                rchg[--ix] = 0;
+                               while (rchgo[--ixo]);
                        }
                }
        }