From 27046e090ef5d4ff806ea0f2e718f7e5daac1ac6 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Wed, 24 Sep 2008 22:51:48 +0000
Subject: [PATCH] Add negative value paranoia

---
 src/conio/bitmap_con.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/conio/bitmap_con.c b/src/conio/bitmap_con.c
index 0194864dbd..a91056cb68 100644
--- a/src/conio/bitmap_con.c
+++ b/src/conio/bitmap_con.c
@@ -597,6 +597,8 @@ static void bitmap_draw_cursor()
 		if(vstat.curs_start<=vstat.curs_end) {
 			xoffset=(vstat.curs_col-1)*vstat.charwidth;
 			yoffset=(vstat.curs_row-1)*vstat.charheight;
+			if(xoffset < 0 || yoffset < 0)
+				return;
 			attr=cio_textinfo.attribute&0x0f;
 			width=vstat.charwidth;
 
-- 
GitLab