Don't add null characters to the expect buffer

They prevent regexec() from seeing the remainder of the buffer.
This commit is contained in:
Samuel Holland 2025-03-22 21:35:47 -05:00 committed by Martin Lund
parent f716d2ccdd
commit da4074c9a5

View file

@ -207,6 +207,11 @@ static int write_(lua_State *L)
// Function to add a character to the circular expect buffer
static void expect_buffer_add(char c)
{
if (!c)
{
return;
}
if (buffer_size < MAX_BUFFER_SIZE)
{
circular_buffer[buffer_size++] = c;