News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

bug in configmanager.cpp and patch file

Started by frithjofh, December 02, 2015, 12:22:01 PM

Previous topic - Next topic

frithjofh

hi everybody,

found a bug in configmanager.cpp which can lead to undefined behaviour. probably harmless...

but patch attached.

function used map.erase(iterator) and then tries to increment that iterator in the next loop and use it again. this is undefined according to both wx documentation and stl documentation.

replaced call to map.erase(iter) inside the loop with call to clear map.clear() after the loop

regards
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

frithjofh

patch has an error

attached the correct one
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

oBFusCATed

This will probably cause a crash someday. Will apply it next week, when I get access to my computer back.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.