The variable rx_bytes is marked VARLOW. Add a missing GET_LOW()
to access rx_bytes.

Reported-by: Gabe Black <gabe.bl...@gmail.com>
Signed-off-by: Volker Rümelin <vr_q...@t-online.de>
---
 src/sercon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sercon.c b/src/sercon.c
index 66a1f24..a33dd08 100644
--- a/src/sercon.c
+++ b/src/sercon.c
@@ -641,7 +641,7 @@ sercon_check_event(void)
     while (inb(addr + SEROFF_LSR) & 0x01) {
         byte = inb(addr + SEROFF_DATA);
         if (GET_LOW(rx_bytes) < sizeof(rx_buf)) {
-            SET_LOW(rx_buf[rx_bytes], byte);
+            SET_LOW(rx_buf[GET_LOW(rx_bytes)], byte);
             SET_LOW(rx_bytes, GET_LOW(rx_bytes) + 1);
             count++;
         }
-- 
2.31.1

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to