error on call an invalid address

This commit is contained in:
云风
2013-09-18 17:41:25 +08:00
parent 5feaf9f593
commit c972b647bd
5 changed files with 38 additions and 13 deletions

View File

@@ -309,7 +309,7 @@ _send(lua_State *L) {
if (session < 0) {
// send to invalid address
// todo: maybe throw error is better
session = 0;
return 0;
}
lua_pushinteger(L,session);
return 1;