Le lundi 29 novembre 2021 à 09:47:09 UTC+1, sups...@gmail.com a écrit :
void output(std::string s)
{
std::cout << const_cast<char*>(("@S14@C92@." + s).c_str()) << std::endl;
Fl::awake(awake, const_cast<char*>(("@S14@C92@." + s).c_str()));
}
I believe the error is in that function, output(), in the call to Fl::awake().
The memory storage of the 2nd argument sent to Fl::awake is unstable, it can be reused at any time
after return from the Fl::awake() function. Change that 2nd argument to a form where you control the lifetime of this char array, and make sure it's not
changed until it's been used by the main thread.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/a7d43e8b-c596-41d2-9978-82d54f2265bcn%40googlegroups.com .
[ Direct Link to Message ]