Closed gbonnema closed 7 years ago
This bug is based on a misunderstanding. C is perfectly capable of copying a struct. So return a local struct should end up in the intended target field.
Assigning a struct does a shallow copy, so pointers are copied, but the dereferenced pointers are not. Just a point of attention.
As this is not a bug, I will close the issue.
In we_menue.c shows the following code in lines 652 - 661:
Now this could lead to problems heavily depending on the OS and machine implementation. This function is used to create submenu items. As the memory was allocated and freed before use, there is no doubt this would lead to problems. Very dependant on OS.
This might have a relationship with issue #6 (F1 / Info menuoptions sometimes cause unexpected signal 11.).
I am looking into how to solve it. It depends on how it is used and how long the memory is necessary for. Will let you know if I have a solution (pull request).