Closed rnpnr closed 10 months ago
I have included it in https://git.sr.ht/~mcepl/vis and it seems to work just fine.
I updated my incorrect commit message and I'm going to apply this. The
only place where the behaviour could be different is when using
file:lines_iterator()
. I tested before and after this patch and I
see no difference in functionality. If this patch was incorrect that
iterator would have broke because the upvalues in the C closure would
have been off.
The only place where this behaviour was encountered was in
file_lines_iterator()
and it was just being worked around.~~There was also likely a bug in the case that
addr
wasNULL
since 2 values would be popped from the stack instead of just 1. It is possible that the case is never hit though.~~Edit: Ignore that last part. It would hit the
lua_argerror()
branch in that case.