commit 434ce8c136a6e22ec20cbbd5ac113089039370c6
Author: Jochen Sprickerhof <[email protected]>
AuthorDate: Tue Apr 21 08:23:59 2020 +0200
Commit: Jochen Sprickerhof <[email protected]>
CommitDate: Tue Apr 21 08:23:59 2020 +0200
Dereference pointers
Thanks Steve Ward.
diff --git a/scroll.c b/scroll.c
index a6a1e52..4ff4598 100644
--- a/scroll.c
+++ b/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);
}