From 36c969a2c37f9e04f4c6d25b10bc3fe23fb8d948 Mon Sep 17 00:00:00 2001 From: cy384 Date: Fri, 22 Jan 2021 21:19:02 -0500 Subject: [PATCH] don't draw null characters onto the screen --- ssheven-console.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ssheven-console.c b/ssheven-console.c index 00f67ba..9793555 100644 --- a/ssheven-console.c +++ b/ssheven-console.c @@ -333,6 +333,7 @@ void draw_screen_color(Rect* r) select_end = MAX(a,b); } + char c = 0; for(pos.row = minRow; pos.row < maxRow; pos.row++) { for (pos.col = minCol; pos.col < maxCol; pos.col++) @@ -351,7 +352,9 @@ void draw_screen_color(Rect* r) if (vtsc->pen.underline) face |= underline; if (face != normal) TextFace(face); - draw_char(pos.col, pos.row, r, (char)vtsc->chars[0]); + c = (char)vtsc->chars[0]; + if (c == '\0') c = ' '; + draw_char(pos.col, pos.row, r, c); if (face != normal) TextFace(normal); if (vtsc->pen.reverse)