mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-23 04:51:56 +00:00
Fix -Wchar-subscripts warnings
array subscript has type ‘char’
This commit is contained in:
parent
79ad905e05
commit
14329d47d8
3 changed files with 5 additions and 3 deletions
|
@ -1276,7 +1276,8 @@ PrintFloat
|
|||
==================
|
||||
*/
|
||||
static void PrintFloat( float f ) {
|
||||
char buf[128], i;
|
||||
char buf[128];
|
||||
int i;
|
||||
|
||||
for ( i = sprintf( buf, "%3.2f", f ); i < 7; i++ ) {
|
||||
buf[i] = ' ';
|
||||
|
|
|
@ -1207,7 +1207,8 @@ PrintFloat
|
|||
==================
|
||||
*/
|
||||
static void PrintFloat( float f ) {
|
||||
char buf[128], i;
|
||||
char buf[128];
|
||||
int i;
|
||||
|
||||
for ( i = sprintf( buf, "%3.2f", f ); i < 7; i++ ) {
|
||||
buf[i] = ' ';
|
||||
|
|
|
@ -929,7 +929,7 @@ void idDeviceContext::DrawEditCursor( float x, float y, float scale ) {
|
|||
}
|
||||
SetFontByScale(scale);
|
||||
float useScale = scale * useFont->glyphScale;
|
||||
const glyphInfo_t *glyph2 = &useFont->glyphs[(overStrikeMode) ? '_' : '|'];
|
||||
const glyphInfo_t *glyph2 = &useFont->glyphs[overStrikeMode ? int('_') : int('|')];
|
||||
float yadj = useScale * glyph2->top;
|
||||
PaintChar(x, y - yadj,glyph2->imageWidth,glyph2->imageHeight,useScale,glyph2->s,glyph2->t,glyph2->s2,glyph2->t2,glyph2->glyph);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue