From 0d4b50a7c008c45a05c23efa3f2c74baa168485f Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sun, 31 Oct 2021 15:28:16 +0000 Subject: [PATCH] Fix syntax errors --- uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uart.c b/uart.c index a3094e0..f5d073d 100644 --- a/uart.c +++ b/uart.c @@ -13,10 +13,10 @@ bool is_whitespace(char character) { } void read_word(uart_inst_t *uart, char *buffer, int buffersize, bool *eol) { - for (uint i == 0; i < buffersize - 1; ++i) { + for (uint i = 0; i < (buffersize - 1); ++i) { buffer[i] = uart_getc(uart); if (is_whitespace(buffer[i])) { - buffer[i + 1] = '\0' + buffer[i + 1] = '\0'; } } -- 2.47.1