From: Maximilian Friedersdorff Date: Sun, 31 Oct 2021 15:28:16 +0000 (+0000) Subject: Fix syntax errors X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=0d4b50a7c008c45a05c23efa3f2c74baa168485f;p=max%2Flanthanide_pdu.git Fix syntax errors --- 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'; } }