From: Richard Kreckel Date: Tue, 18 May 2010 22:18:35 +0000 (+0200) Subject: Fix dangerous iterator use. X-Git-Tag: release_1-6-0~51 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=1a5127603d93125b75ee51c94200faf0b586ef32 Fix dangerous iterator use. This was detected by cppcheck and reported by Martin Ettl . --- diff --git a/ginac/excompiler.cpp b/ginac/excompiler.cpp index 8d6670f1..80e4dd19 100644 --- a/ginac/excompiler.cpp +++ b/ginac/excompiler.cpp @@ -172,7 +172,7 @@ public: for (std::vector::iterator it = filelist.begin(); it != filelist.end();) { if (it->name == filename) { clean_up(it); - filelist.erase(it); + it = filelist.erase(it); } else { ++it; }