Skip to content
Snippets Groups Projects
Commit 28252255 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Clamp values for y in highlighting loop.

This is a really stupid way of drawing the highlight, but fixing it
this way is trivial vs. refactoring all the ugly.

Fixes #192
parent a7bdbe40
No related branches found
No related tags found
No related merge requests found
......@@ -265,6 +265,14 @@ blockmode(void)
buf=(char *)malloc(80*ti.screenheight*2);
memcpy(buf,Screen[ActivePage][FirstLine],80*ti.screenheight*2);
for(y=Y1-FirstLine;y<=Y2-FirstLine;y++) {
/*
* This loop should really only iterate through lines
* of interest, but this is an easy fix.
*/
if (y < 0)
continue;
if (y >= ti.screenheight)
break;
for(x=X1;x<=X2;x++) {
buf[y*160+x*2+1]=112;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment