Fix SIGSEGV when substituting sequence with shorter one
This commit is contained in:
committed by
Paul Beckingham
parent
ab443a8ecf
commit
81183ae7d1
@@ -1393,7 +1393,7 @@ void Task::substitute (
|
||||
int skew = 0;
|
||||
for (unsigned int i = 0; i < start.size () && !done; ++i)
|
||||
{
|
||||
description.replace (start[i + skew], end[i] - start[i], to);
|
||||
description.replace (start[i] + skew, end[i] - start[i], to);
|
||||
skew += to.length () - (end[i] - start[i]);
|
||||
++changes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user