fix parameter count calculation (again)
This commit is contained in:
parent
0697de373a
commit
b9109f5515
5
vt100.c
5
vt100.c
|
@ -210,7 +210,7 @@ static void scrolling_region(void) {
|
||||||
--bottom;
|
--bottom;
|
||||||
|
|
||||||
|
|
||||||
if (top < bottom && bottom < 24) {
|
if ((top < bottom) && (bottom < 24)) {
|
||||||
window[0] = top;
|
window[0] = top;
|
||||||
window[1] = bottom;
|
window[1] = bottom;
|
||||||
__y = DECOM ? top : 0;
|
__y = DECOM ? top : 0;
|
||||||
|
@ -539,7 +539,7 @@ void vt100_process(const unsigned char *buffer, unsigned buffer_size) {
|
||||||
|
|
||||||
case st_lbracket:
|
case st_lbracket:
|
||||||
private = 0;
|
private = 0;
|
||||||
parm_count = 1;
|
parm_count = 0;
|
||||||
parms[0] = 0;
|
parms[0] = 0;
|
||||||
parms[1] = 0;
|
parms[1] = 0;
|
||||||
if (c == '?') { private = 1; state = st_parm; continue; }
|
if (c == '?') { private = 1; state = st_parm; continue; }
|
||||||
|
@ -551,6 +551,7 @@ void vt100_process(const unsigned char *buffer, unsigned buffer_size) {
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case st_lbracket2:
|
case st_lbracket2:
|
||||||
lbracket2:
|
lbracket2:
|
||||||
|
++parm_count;
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'A': cursor_up(); break;
|
case 'A': cursor_up(); break;
|
||||||
case 'B': cursor_down(); break;
|
case 'B': cursor_down(); break;
|
||||||
|
|
Loading…
Reference in New Issue