Don't forget to log output in lua expect()

This commit is contained in:
Martin Lund 2024-04-19 16:57:27 +02:00
parent 0105346a11
commit f1c5394570

View file

@ -34,6 +34,7 @@
#include "options.h" #include "options.h"
#include "tty.h" #include "tty.h"
#include "xymodem.h" #include "xymodem.h"
#include "log.h"
#define MAX_BUFFER_SIZE 2000 // Maximum size of circular buffer #define MAX_BUFFER_SIZE 2000 // Maximum size of circular buffer
@ -307,6 +308,12 @@ static int expect(lua_State *L)
{ {
putchar(c); putchar(c);
expect_buffer_add(c); expect_buffer_add(c);
if (option.log)
{
log_putc(c);
}
// Match against the entire buffer // Match against the entire buffer
if (match_regex(&regex)) if (match_regex(&regex))
{ {