aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2017-06-05 23:53:07 +0200
committerBoris Faure <billiob@gmail.com>2017-06-05 23:53:07 +0200
commitcc5fcac03d56a2aa05ff9b9a709de0c4baada4c5 (patch)
tree4ae137e521e05cca43761f85a1eeda425b67d66f
parenttermpty: handle DECERA (diff)
downloadterminology-cc5fcac03d56a2aa05ff9b9a709de0c4baada4c5.tar.gz
termptyesc: fix handling of DECSLRM. Ref https://phab.enlightenment.org/T5533
-rw-r--r--src/bin/termptyesc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index cead2ce..52bc1c4 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -779,6 +779,8 @@ _handle_esc_csi_decslrm(Termpty *ty, Eina_Unicode **b)
DBG("DECSLRM (%d;%d) Set Left and Right Margins", left, right);
TERMPTY_RESTRICT_FIELD(left, 1, ty->w);
+ if (right < 1)
+ right = ty->w;
TERMPTY_RESTRICT_FIELD(right, 3, ty->w+1);
if (left >= right) goto bad;