Explorar el Código

add additional information in die calls for debugging

Jan Klemkow hace 5 años
padre
commit
200c1a9227
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      scroll.c

+ 2 - 2
scroll.c

@@ -231,10 +231,10 @@ getcursorposition(int *x, int *y)
 	input[n] = '\0';
 
 	if (sscanf(input, "\033[%d;%dR", x, y) != 2)
-		die("parsing cursor position");
+		die("parsing cursor position: %s", input);
 
 	if (x <= 0 || y <= 0)
-		die("invalid cursor position");
+		die("invalid cursor position: x=%d y=%d", x, y);
 }
 
 void