Closed thrimbor closed 4 years ago
I'm thinking that setting old-filter-mode
to "nearest"
if the call to SDL_GetHint
returned NULL
might be a cleaner solution? Would only require one if
-case and still complies to SDL documentation.
Yeah, that's probably better. I changed it now.
It's possible for hints in SDL to have no value, and if that's the case,
SDL_GetHint()
will return NULL.FC_UploadGlyphCache
didn't handle this case and instead passed the NULL tosnprintf()
which made it crash on my target system.I modified the function to check the obtained pointer first, and only execute theI modified the function to check the obtained pointer first, and if it is NULL, it gets set to the string constant "nearest" instead. This fixed the crash for me.snprintf
(and the later hint-resetting) if that pointer isn't NULL. This fixed the crash for me.