From 6b15002e5d75ca287b9ed3d3d367259e5241c9eb Mon Sep 17 00:00:00 2001 From: Timo Korvola Date: Wed, 28 Mar 2018 19:32:41 +0300 Subject: [PATCH] Fix 8-bit characters in dialogs. We don't handle file name encoding though, and that is a mess in the OS world as well. Thus only Latin-1 encoded file names are likely to work. --- src/sdl/sf_osfdlg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sdl/sf_osfdlg.c b/src/sdl/sf_osfdlg.c index dc514c4..3f25f12 100644 --- a/src/sdl/sf_osfdlg.c +++ b/src/sdl/sf_osfdlg.c @@ -155,7 +155,8 @@ STATIC void writetext( ulong color, const char *s, int x, int y, int w, int cent ts->cy = y; ts->fore = color; //printf("3\n"); fflush(stdout); - while (*s) sf_writeglyph(ts->font->getglyph(ts->font,(*s++),1)); + while (*s) + sf_writeglyph(ts->font->getglyph(ts->font, (unsigned char)(*s++), 1)); //printf("4\n"); sf_setclip(ox,oy,ow,oh); //printf("5\n"); -- 2.34.1