summaryrefslogtreecommitdiff
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
parentbbfa60120ea6978982e95ef12f77e4b98fa1a02a (diff)
termptyesc: fix handling of DECSLRM. Ref 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)
779 DBG("DECSLRM (%d;%d) Set Left and Right Margins", left, right); 779 DBG("DECSLRM (%d;%d) Set Left and Right Margins", left, right);
780 780
781 TERMPTY_RESTRICT_FIELD(left, 1, ty->w); 781 TERMPTY_RESTRICT_FIELD(left, 1, ty->w);
782 if (right < 1)
783 right = ty->w;
782 TERMPTY_RESTRICT_FIELD(right, 3, ty->w+1); 784 TERMPTY_RESTRICT_FIELD(right, 3, ty->w+1);
783 785
784 if (left >= right) goto bad; 786 if (left >= right) goto bad;