golang-ui / nuklear

This project provides Go bindings for nuklear.h — a small ANSI C GUI library.
https://github.com/vurtun/nuklear
MIT License
1.57k stars 98 forks source link

NkCombo() / NkCombobox() modifies string list #55

Open jkvatne opened 6 years ago

jkvatne commented 6 years ago

The NkCombo() fails. The problem seems to be in unpackArgSString(). The string list supplied to NkCombo() will be modified and the original strings will be destroyed. This is not systematic. Sometimes it fails when the debugger is run, and sometimes when running standalone. Restarting can make the error disapear. Testing with agressive garbage collection seems to increase the error rate.

Using NkComboboxString() works fine. You just have to concatenate the strings with \x00 as separator.