Fix 8-bit characters in dialogs.
authorTimo Korvola <tkorvola@iki.fi>
Wed, 28 Mar 2018 16:32:41 +0000 (19:32 +0300)
committerTimo Korvola <tkorvola@iki.fi>
Wed, 28 Mar 2018 16:36:24 +0000 (19:36 +0300)
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

index dc514c4e7f48b3ad6676cd2f802611420113cdd5..3f25f12ed3a04bb934d4ca5b931c8a787d1be154 100644 (file)
@@ -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");