From b40eb333ff25c45726877f076e0298a69585a49e Mon Sep 17 00:00:00 2001 From: ninya9k <> Date: Wed, 15 Nov 2023 14:53:31 +0000 Subject: [PATCH] allow \r\n --- uttt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uttt.c b/uttt.c index 769bbfd..961fe4c 100644 --- a/uttt.c +++ b/uttt.c @@ -458,6 +458,10 @@ int ut_sockgetpos(const struct ut_state *state, int sock, int *y, int *x, bool r char byte; while (true) { if (ut_readfill(sock, &byte, 1)) {return 1;} + // allow \r\n + if (index == 3 && byte == '\r') { + if (ut_readfill(sock, &byte, 1)) {return 1;} + } if (index == 0 && byte == '|') { if (ut_ignore_line(sock)) {return -1;} } else if (index == 0) {