Skip to content

Commit

Permalink
Updated lua.c to fix #3118 telnet issue
Browse files Browse the repository at this point in the history
  • Loading branch information
TerryE authored and marcelstoer committed Jun 9, 2020
1 parent a04b085 commit 544ee81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/lua53/lua.c
Expand Up @@ -335,7 +335,8 @@ static int l_read_stdin (lua_State *L) {
return 1; /* return false if pipe empty */
if (b[l-1] != '\n') {
/* likewise if not CR terminated, then unread and ditto */
lua_getfield(L, 1, "unread");
lua_insert(L, 1); /* insert false return above the pipe */
lua_getfield(L, 2, "unread");
lua_insert(L, 1); /* insert pipe.unread above the pipe */
lua_call(L, 2, 0); /* pobj:unread(line) */
return 1; /* return false */
Expand Down

0 comments on commit 544ee81

Please sign in to comment.