X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fpolyfill.c;h=8b01ea1184bf7946d4a53c201ef5ae96951207b8;hb=44264cadf1268165c5293ed3bb2bf932336d1ae6;hp=5b7098726ecf64b837f9959850f4d3f5d19bd1a4;hpb=f9fb40518b148be5e472ae4d47651d594ec5421b;p=gbajam22 diff --git a/src/polyfill.c b/src/polyfill.c index 5b70987..8b01ea1 100644 --- a/src/polyfill.c +++ b/src/polyfill.c @@ -87,6 +87,9 @@ void polyfill_flat(struct pvertex *varr, int vnum, unsigned char col) } } + if(top < 0) top = 0; + if(bot >= fbheight) bot = fbheight - 1; + fbptr = fb + top * fbwidth; for(i=top; i<=bot; i++) { start = scantab[0][i];