Describe the bug
ImageCache keyed by const char* (tinyui.h:160): hashes/compares the pointer, not the string — so the cache lookup at widgets.cpp:51
misbehaves across different pointers holding equal paths. Correctness-adjacent, but it also defeats the cache (duplicate loads).
Use std::string as the key.
To Reproduce
- Add an image to the imagecache
- Use 2 different strings with the same context and add them to the cache
- See that there will be 2 entries instead of one
Expected behavior
There shall only one entry.
Screenshots
NA
Desktop (please complete the following information):
Describe the bug
ImageCache keyed by const char* (tinyui.h:160): hashes/compares the pointer, not the string — so the cache lookup at widgets.cpp:51
misbehaves across different pointers holding equal paths. Correctness-adjacent, but it also defeats the cache (duplicate loads).
Use std::string as the key.
To Reproduce
Expected behavior
There shall only one entry.
Screenshots
NA
Desktop (please complete the following information):