diff --git a/enet.c b/enet.c index 9b8a347..2f1843d 100644 --- a/enet.c +++ b/enet.c @@ -476,7 +476,7 @@ static int host_get_peer(lua_State *l) { size_t peer_index = (size_t) luaL_checkint(l, 2) - 1; - if (peer_index < 0 || peer_index >= host->peerCount) { + if (peer_index >= host->peerCount) { luaL_argerror (l, 2, "Invalid peer index"); } @@ -768,10 +768,6 @@ static const struct luaL_Reg enet_peer_funcs [] = { {NULL, NULL} }; -static const struct luaL_Reg enet_event_funcs [] = { - {NULL, NULL} -}; - int luaopen_enet(lua_State *l) { enet_initialize(); atexit(enet_deinitialize);