瀏覽代碼

add additional information in die calls for debugging

Jan Klemkow 6 年之前
父節點
當前提交
200c1a9227
共有 1 個文件被更改,包括 2 次插入2 次删除
  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