Fix scrolling region checks.

pull/1/head
Nicholas Marriott 2007-09-29 17:45:10 +00:00
parent 75cc8971ec
commit e6424bcce9
1 changed files with 5 additions and 5 deletions

10
input.c
View File

@ -1,4 +1,4 @@
/* $Id: input.c,v 1.11 2007-09-29 14:25:49 nicm Exp $ */
/* $Id: input.c,v 1.12 2007-09-29 17:45:10 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -927,12 +927,12 @@ input_handle_sequence_decstbm(struct input_ctx *ictx)
if (input_get_argument(ictx, 1, &m, 1) != 0)
return;
if (n == 0 || n > ictx->s->sy || m == 0 || m > ictx->s->sx) {
log_debug3("decstbm: out of range: %hu,%hu", m, n);
if (n == 0 || n > ictx->s->sy || m == 0 || m > ictx->s->sy) {
log_debug3("decstbm: out of range: %hu,%hu", n, m);
return;
}
if (m > n) {
log_debug3("decstbm: out of range: %hu,%hu", m, n);
if (n > m) {
log_debug3("decstbm: out of range: %hu,%hu", n, m);
return;
}