summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-20 22:24:19 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-20 22:24:19 -0400
commit6700ca1fb0d83dcd40c9c63d45b83b4cb305fc18 (patch)
treef5f4d7103b7a79217bbf38faa1c6e5d2cbe076c5
parent51eef0b615bc7a540d29ab7fc42906fd77ee9807 (diff)
downloadlibvt100-6700ca1fb0d83dcd40c9c63d45b83b4cb305fc18.tar.gz
libvt100-6700ca1fb0d83dcd40c9c63d45b83b4cb305fc18.zip
fix off by one error
-rw-r--r--src/screen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c
index d3af19c..52bb37f 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -288,8 +288,8 @@ void vt100_screen_move_to(VT100Screen *vt, int row, int col)
col = 0;
}
- if (col > vt->grid->max.col) {
- col = vt->grid->max.col;
+ if (col >= vt->grid->max.col) {
+ col = vt->grid->max.col - 1;
}
vt->grid->cur.row = row;