lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


(by Tuomo Valkonen):

> The following (admitted erroneous) code causes the lua executable
> (and probably all code that uses the IO library) to segfault:
> 
> o=io.open("foo", "w")
> o.close()


Follows a correction:

** liolib.c:
161c161
<   if (lua_isnone(L, 1)) {
---
>   if (lua_isnone(L, 1) && lua_type(L, lua_upvalueindex(1)) == LUA_TTABLE) {

-- Roberto