From f1c5394570bfdb0d136606e1126be69dc182b473 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Fri, 19 Apr 2024 16:57:27 +0200 Subject: [PATCH] Don't forget to log output in lua expect() --- src/script.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/script.c b/src/script.c index c19fe95..9490057 100644 --- a/src/script.c +++ b/src/script.c @@ -34,6 +34,7 @@ #include "options.h" #include "tty.h" #include "xymodem.h" +#include "log.h" #define MAX_BUFFER_SIZE 2000 // Maximum size of circular buffer @@ -307,6 +308,12 @@ static int expect(lua_State *L) { putchar(c); expect_buffer_add(c); + + if (option.log) + { + log_putc(c); + } + // Match against the entire buffer if (match_regex(®ex)) {