lua-users home
lua-l archive

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




On Fri, Dec 21, 2018 at 6:12 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
Thank you, that simplifies the code. [...]
- if (!lua_isnone(L, lua_upvalueindex(i))) { + if (0 < i <= 256 && !lua_isnone(L, lua_upvalueindex(i))) {

I don't think the _expression_ (0 < i <= 256) does what you expect in C. Do you mean ((i > 0) && (i <= 256)), or perhaps this was intended as psuedo-code?

-- Roberto