stdinc: Drastically improve SDL_StepUTF8() and make it a public API.

Fixes #10105.
This commit is contained in:
Ryan C. Gordon committed 2024-06-27 17:36:09 -04:00
1 parent 9b8c5f642f
commit a9cfcf6bde
8 files changed
+211 -58

No files matched your search

+1 -1
View File
@@ -185,7 +185,7 @@ static char *CaseFoldUtf8String(const char *fname)
Uint32 codepoint;
char *ptr = retval;
size_t remaining = allocation;
while ((codepoint = SDL_StepUTF8(&fname, 4)) != 0) {
while ((codepoint = SDL_StepUTF8(&fname, NULL)) != 0) {
Uint32 folded[3];
const int num_folded = SDL_CaseFoldUnicode(codepoint, folded);
SDL_assert(num_folded > 0);