Reset buffer size at start of expect

This commit is contained in:
Davis C 2024-04-17 11:06:41 -05:00 committed by Martin Lund
parent 1cefb7b6bc
commit d0e95c5fba

View file

@ -265,6 +265,9 @@ static int expect(lua_State *L)
int ret = 0; int ret = 0;
char c; char c;
// Resets buffer to ignore previous `expect` calls
buffer_size = 0;
if ((string == NULL) || (timeout < 0)) if ((string == NULL) || (timeout < 0))
{ {
ret = -1; ret = -1;