Fix warning
This commit is contained in:
parent
3015f39368
commit
1342fd3ecf
|
@ -343,13 +343,13 @@ static void interfaceFontDrawImpl(unsigned char* buf, const char* string, int le
|
||||||
|
|
||||||
unsigned char* ptr = buf;
|
unsigned char* ptr = buf;
|
||||||
while (*string != '\0') {
|
while (*string != '\0') {
|
||||||
char ch = *string++;
|
unsigned char ch = static_cast<unsigned char>(*string++);
|
||||||
|
|
||||||
int characterWidth;
|
int characterWidth;
|
||||||
if (ch == ' ') {
|
if (ch == ' ') {
|
||||||
characterWidth = gCurrentInterfaceFontDescriptor->wordSpacing;
|
characterWidth = gCurrentInterfaceFontDescriptor->wordSpacing;
|
||||||
} else {
|
} else {
|
||||||
characterWidth = gCurrentInterfaceFontDescriptor->glyphs[ch & 0xFF].width;
|
characterWidth = gCurrentInterfaceFontDescriptor->glyphs[ch].width;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char* end;
|
unsigned char* end;
|
||||||
|
@ -364,7 +364,7 @@ static void interfaceFontDrawImpl(unsigned char* buf, const char* string, int le
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
InterfaceFontGlyph* glyph = &(gCurrentInterfaceFontDescriptor->glyphs[ch & 0xFF]);
|
InterfaceFontGlyph* glyph = &(gCurrentInterfaceFontDescriptor->glyphs[ch]);
|
||||||
unsigned char* glyphDataPtr = gCurrentInterfaceFontDescriptor->data + glyph->offset;
|
unsigned char* glyphDataPtr = gCurrentInterfaceFontDescriptor->data + glyph->offset;
|
||||||
|
|
||||||
// Skip blank pixels (difference between font's line height and glyph height).
|
// Skip blank pixels (difference between font's line height and glyph height).
|
||||||
|
|
Loading…
Reference in New Issue