mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Reset buffer size at start of expect
This commit is contained in:
parent
1cefb7b6bc
commit
d0e95c5fba
1 changed files with 3 additions and 0 deletions
|
|
@ -265,6 +265,9 @@ static int expect(lua_State *L)
|
|||
int ret = 0;
|
||||
char c;
|
||||
|
||||
// Resets buffer to ignore previous `expect` calls
|
||||
buffer_size = 0;
|
||||
|
||||
if ((string == NULL) || (timeout < 0))
|
||||
{
|
||||
ret = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue