diff options
Diffstat (limited to 'host/font.c')
-rw-r--r-- | host/font.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/font.c b/host/font.c index c1f1d22..59bc2ef 100644 --- a/host/font.c +++ b/host/font.c @@ -18,12 +18,13 @@ void render_glyph(glyph_t *g, color_t *buf, unsigned int bufwidth, int offx, uns } color_t *p = buf + (offy+y)*bufwidth + offx; /* Take care to only render what's within the framebuffer's bounds */ - for(unsigned int x=0; (x < g->width) && (offx+x < bufwidth); x++){ + for(int x=0; (x < g->width) && (offx+x < (int)bufwidth); x++){ if(offx + x >= 0){ color_t c = (data&(1<<(g->width-1))) ? fg : bg; - *p++ = c; - data <<= 1; + *p = c; } + p++; + data <<= 1; } } } |