]> git.friedersdorff.com Git - max/lanthanide_pdu.git/commitdiff
Fix syntax errors
authorMaximilian Friedersdorff <max@friedersdorff.com>
Sun, 31 Oct 2021 15:28:16 +0000 (15:28 +0000)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Sun, 31 Oct 2021 15:28:16 +0000 (15:28 +0000)
uart.c

diff --git a/uart.c b/uart.c
index a3094e0d4acdcd912321c311ce8634a7dbd2ac00..f5d073d80ac4097c98b185d180df707a277ad099 100644 (file)
--- 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';
         }
     }