Trying to find a mem corruption bug from Stile. It's quite difficult with DevC++ (gcc), because gdb is not very good at catching errors. I may have to re-create a Visual C++ project for Stile to find the bug. Another option is refactor some shit and hope for the best. In worst case the bug has existed for a long time in some part of the source code. I guess it's about time to find out where it is.
The bug was a trailing zero type. strlen() returns the length without the trailing zero so you need to add it to the buffer given to strcpy which copies also the trailing zero to destination.