jaeandersson / swig

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.
http://www.swig.org
Other
23 stars 19 forks source link

Fix use of invalid iterator #74

Closed traversaro closed 8 years ago

traversaro commented 8 years ago

This problem is reported by running cppcheck on the generated C++, and originated in the python module, see https://sourceforge.net/p/swig/bugs/1347/ . Unfortunately it propagated through copy pasting to several other modules. The fix used here is directly extracted from the code used in the Python module, see https://github.com/swig/swig/blob/2740812970382202fe97e52f7c881eaa71c2e7c0/Lib/python/pycontainer.swg#L329 .

jaeandersson commented 8 years ago

Thank you for your contribution!