String::replace() doesn't work when iter_beg==iter_end

Create issue
Issue #377 resolved
Former user created an issue

Automatic migration. Original reporter: "Timo"

The function calls erase() if the begin and end iterators of the replaced range are identical:

if (iter_beg == iter_end) { erase(safe_iter_dif(iter_beg, begin()), safe_iter_dif(iter_end, iter_beg)); }

Instead of this it should test the iterators of the NEW string:

if (iter_newBeg == iter_newEnd)

Reproducibility: always

Comments (1)

  1. Log in to comment