From 5fc7009037e392ccec021b1251ddfff9a8604368 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 1 Aug 2022 21:35:03 +0200 Subject: fix some sign comparision warnings --- src/user/app/init/driver/ansiterm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/user/app/init/driver') diff --git a/src/user/app/init/driver/ansiterm.c b/src/user/app/init/driver/ansiterm.c index 7b16537..7d842a5 100644 --- a/src/user/app/init/driver/ansiterm.c +++ b/src/user/app/init/driver/ansiterm.c @@ -50,12 +50,12 @@ static void scroll(void) { cursor.y--; } -static void font_blit(int glyph, int x, int y) { - if (glyph < 0 || glyph >= font.glyph_amt) glyph = 0; +static void font_blit(size_t glyph, int x, int y) { + if (glyph >= font.glyph_amt) glyph = 0; char *bitmap = font_data + font.glyph_size * glyph; - for (int i = 0; i < font.w; i++) { - for (int j = 0; j < font.h; j++) { + for (size_t i = 0; i < font.w; i++) { + for (size_t j = 0; j < font.h; j++) { size_t idx = j * font.w + i; char byte = bitmap[idx / 8]; byte >>= (7-(idx&7)); -- cgit v1.2.3