From 15b7221813a039df3e0690b3e2ed59a0561f2926 Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 7 Mar 2014 01:08:04 +0100 Subject: New, fancy schmancy scrolling working as intended --- host/font.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'host/font.c') 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; } } } -- cgit