From bcdf513e3177bc9529245ef6f954951714f3f6c5 Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 19 May 2020 09:08:10 -0400 Subject: [PATCH] direct poc: exit out on bad ncdirect_cursor_up() --- src/poc/direct.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/poc/direct.c b/src/poc/direct.c index 934f24ae1..efd1e14bb 100644 --- a/src/poc/direct.c +++ b/src/poc/direct.c @@ -48,7 +48,9 @@ int main(void){ y += 2; // we just went down two lines while(y > 3){ const int up = y >= 3 ? 3 : y; - ret |= ncdirect_cursor_up(n, up); + if(ncdirect_cursor_up(n, up)){ + return EXIT_FAILURE; + } fflush(stdout); y -= up; int newy;