Skip to content

Commit

Permalink
PROJStringFormatter::toString(): avoid invalid iterator increment (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Nov 8, 2021
1 parent fa0c0e6 commit 3300531
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iso19111/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7678,7 +7678,7 @@ const std::string &PROJStringFormatter::toString() const {
iterCur = steps.erase(iterPrev, std::next(iterCur));
if (iterCur != steps.begin())
iterCur = std::prev(iterCur);
if (iterCur == steps.begin())
if (iterCur == steps.begin() && iterCur != steps.end())
++iterCur;
};

Expand Down

0 comments on commit 3300531

Please sign in to comment.