Browse Source

* Workaround for illegal ^[[0,0H ANSI escape code.

tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
8ac089aa7a
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      cucul/import.c

+ 3
- 3
cucul/import.c View File

@@ -347,8 +347,8 @@ static cucul_canvas_t *import_ansi(void const *data, unsigned int size)
{ {
case 'f': /* CUP - Cursor Position */ case 'f': /* CUP - Cursor Position */
case 'H': /* HVP - Character And Line Position */ case 'H': /* HVP - Character And Line Position */
x = (argc > 1) ? argv[1] - 1 : 0;
y = (argc > 0) ? argv[0] - 1 : 0;
x = (argc > 1 && argv[1] > 0) ? argv[1] - 1 : 0;
y = (argc > 0 && argv[0] > 0) ? argv[0] - 1 : 0;
break; break;
case 'A': /* CUU - Cursor Up */ case 'A': /* CUU - Cursor Up */
y -= argc ? argv[0] : 1; y -= argc ? argv[0] : 1;
@@ -370,7 +370,7 @@ static cucul_canvas_t *import_ansi(void const *data, unsigned int size)
save_x = x; save_x = x;
save_y = y; save_y = y;
break; break;
case 'u': /* Private (reload cursor positin) */
case 'u': /* Private (reload cursor position) */
x = save_x; x = save_x;
y = save_y; y = save_y;
break; break;


Loading…
Cancel
Save