File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,8 @@ unified_difft::differencest unified_difft::lcss(
260
260
{
261
261
differences.push_back (differencet::NEW);
262
262
--j;
263
- --new_rit;
263
+ if (new_goto_program.instructions .begin ()!=new_rit)
264
+ --new_rit;
264
265
}
265
266
else if (j == 0 )
266
267
{
@@ -273,15 +274,18 @@ unified_difft::differencest unified_difft::lcss(
273
274
{
274
275
differences.push_back (differencet::SAME);
275
276
--i;
276
- --old_rit;
277
+ if (old_goto_program.instructions .begin ()!=old_rit)
278
+ --old_rit;
277
279
--j;
278
- --new_rit;
280
+ if (new_goto_program.instructions .begin ()!=new_rit)
281
+ --new_rit;
279
282
}
280
283
else if (lcss_matrix[i][j - 1 ] < lcss_matrix[i][j])
281
284
{
282
285
differences.push_back (differencet::DELETED);
283
286
--i;
284
- --old_rit;
287
+ if (old_goto_program.instructions .begin ()!=old_rit)
288
+ --old_rit;
285
289
}
286
290
else
287
291
{
You can’t perform that action at this time.
0 commit comments