31 lines
899 B
Diff
31 lines
899 B
Diff
commit 226809aebb345e74d371bb43a2b434b490be527a
|
|
Author: Ethan A Merritt <merritt@u.washington.edu>
|
|
Date: Wed Jan 15 11:56:13 2025 -0800
|
|
|
|
dumb: more stringent tests against y bound of dumb terminal charcell array
|
|
|
|
Bug 2756
|
|
|
|
diff --git term/dumb.trm term/dumb.trm
|
|
index 498e27fc6..fdc94fbf5 100644
|
|
--- term/dumb.trm
|
|
+++ term/dumb.trm
|
|
@@ -801,7 +801,7 @@ DUMB_put_text(unsigned int x, unsigned int y, const char *str)
|
|
{
|
|
int i, length;
|
|
|
|
- if (y > dumb_ymax)
|
|
+ if (y < 0 || y > dumb_ymax)
|
|
return;
|
|
|
|
length = gp_strlen(str);
|
|
@@ -949,7 +949,7 @@ ENHdumb_FLUSH()
|
|
y += i;
|
|
|
|
/* print the string fragment, perhaps invisibly */
|
|
- if (ENHdumb_show && y < dumb_ymax) {
|
|
+ if (ENHdumb_show && (0 <= y && y < dumb_ymax)) {
|
|
for (i = 0; i < len && x < dumb_xmax; i++, x++) {
|
|
utf8_copy_one( (char *)(&DUMB_PIXEL(x, y)), gp_strchrn(str,i));
|
|
#ifndef NO_DUMB_COLOR_SUPPORT
|