summaryrefslogtreecommitdiff
path: root/in_sfnt.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2008-07-09 17:06:29 +0000
committerSimon Tatham <anakin@pobox.com>2008-07-09 17:06:29 +0000
commitc35b288fccdbd17dd88f57c665d0b71739e8fc6c (patch)
treef44bc1b26302bd8cd4199e4b5da35598c594f0ca /in_sfnt.c
parent8013c941bcf3f9095f2db590761fd3e7b0b474e0 (diff)
downloadhalibut-c35b288fccdbd17dd88f57c665d0b71739e8fc6c.zip
halibut-c35b288fccdbd17dd88f57c665d0b71739e8fc6c.tar.gz
halibut-c35b288fccdbd17dd88f57c665d0b71739e8fc6c.tar.bz2
halibut-c35b288fccdbd17dd88f57c665d0b71739e8fc6c.tar.xz
Turn the numeric parameter to err_sfntbadglyph from wchar_t to
unsigned int, after a correspondent mentioned that DJGPP produces a very scary warning about integer promotion making use of the former in va_arg non-portable. Whether or not that's standards-justifiable, it's certainly the case that we were casting _to_ wchar_t from unsigned int in all cases of this error actually being used, so the simplest thing is just to transfer the number through va_arg as unsigned. [originally from svn r8112]
Diffstat (limited to 'in_sfnt.c')
-rw-r--r--in_sfnt.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/in_sfnt.c b/in_sfnt.c
index fc37dc0..0d2c7d5 100644
--- a/in_sfnt.c
+++ b/in_sfnt.c
@@ -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);