mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Reset buffer size at start of expect
This commit is contained in:
parent
a9cc0fba7d
commit
10e6384c63
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