浏览代码

Dereference pointers

Thanks Steve Ward.
Jochen Sprickerhof 5 年之前
父节点
当前提交
434ce8c136
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scroll.c

+ 1 - 1
scroll.c

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