[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bug in lauxlib.c : new explanation
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 14 May 2020 11:34:24 -0300
> The function luaL_loadfilex ends with these lines:
>
> readstatus = ferror(lf.f);
> if (filename) fclose(lf.f); /* close file (even in case of errors) */
> if (readstatus) {
> lua_settop(L, fnameindex); /* ignore results from 'lua_load' */
> return errfile(L, "read", fnameindex);
> }
>
>
> I give a candy to anyone who sees the bug ;-)
I still fail to see the bug. What is the problem if the error reported
is a real error in 'fclose' instead of the previous error? More to the
point, do you have a concrete example where this issue causes any
harm or confusion?
-- Roberto
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org