diff options
| -rw-r--r-- | error.c | 5 | ||||
| -rw-r--r-- | in_sfnt.c | 9 |
2 files changed, 6 insertions, 8 deletions
@@ -18,7 +18,8 @@ static void do_error(int code, va_list ap) { char c; int i, j; char *sp, *sp2; - wchar_t *wsp, *wsp2, wc; + wchar_t *wsp, *wsp2; + unsigned wc; filepos fpos, fpos2, *fposp; int flags = 0; @@ -376,7 +377,7 @@ static void do_error(int code, va_list ap) { break; case err_sfntbadglyph: fpos = *va_arg(ap, filepos *); - wc = va_arg(ap, wchar_t); + wc = va_arg(ap, unsigned); sprintf(error, "warning: character U+%04X references an non-existent glyph", wc); @@ -886,8 +886,7 @@ void sfnt_getmap(font_info *fi) { idx = (k + idDelta[j]) & 0xffff; if (idx != 0) { if (idx > sf->nglyphs) { - error(err_sfntbadglyph, &sf->pos, - (wchar_t)k); + error(err_sfntbadglyph, &sf->pos, k); continue; } fi->bmp[k] = sfnt_indextoglyph(sf, idx); @@ -898,16 +897,14 @@ void sfnt_getmap(font_info *fi) { for (k = startCode[j]; k <= endCode[j]; k++) { if (startidx + k - startCode[j] >= nglyphindex) { - error(err_sfntbadglyph, &sf->pos, - (wchar_t)k); + error(err_sfntbadglyph, &sf->pos, k); continue; } idx = glyphIndexArray[startidx + k - startCode[j]]; if (idx != 0) { idx = (idx + idDelta[j]) & 0xffff; if (idx > sf->nglyphs) { - error(err_sfntbadglyph, &sf->pos, - (wchar_t)k); + error(err_sfntbadglyph, &sf->pos, k); continue; } fi->bmp[k] = sfnt_indextoglyph(sf, idx); |