lua-users home
lua-l archive

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


Hi Bill,

As a fix I've simply put a test around the above code like this:

if (alias) { while (*alias) {
       lua_pushnumber(L, i);
       lua_pushstring(L, *alias);
       lua_settable(L, -3);
       i++; alias++;
       }
   }

The above fix works but I'm not sure if it is the best solution within
the design of luasocket; perhaps a fix deeper in the socket hierarchy
(e.g. usocket.c) would be better.

Seems hard to fix it within usocket.c. I don't object to your approach and
I am happy to prevent LuaSocket from crashing anywhere possible.

Thanks,
Diego.