[Bugfix] FS#13912 - splash_scroller with cyrillic crashes

I think they mean corrupted not crashes as I couldn't repro that

splash_scroller stepped by individual chars and split multibyte
sequences leaving corrupted chars

now it uses the new font_measurestring() to get the max_w and chops
it at break chars instead

this required a bit of a logic change to the function but should be
as good with less complications

Change-Id: I692db8b4737f41aec08dbc122fb844028498326d
This commit is contained in:
William Wilgus 2026-05-30 10:37:34 -04:00
parent 1c84362f3e
commit a7754eee71
3 changed files with 69 additions and 52 deletions

View file

@ -1040,6 +1040,8 @@ struct plugin_api {
/* new stuff at the end, sort into place next time
the API gets incompatible */
int (*font_measurestring)(const unsigned char *str, size_t maxbytes,
size_t maxwidth, int *w, int *h, int fontnum);
};
/* plugin header */