Explorar el Código

Fixed a bug when requiring enet

Alex Szpakowski hace 12 años
padre
commit
f9ce521794
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/libraries/enet/enet.cpp

+ 3 - 1
src/libraries/enet/enet.cpp

@@ -749,5 +749,7 @@ int luaopen_enet(lua_State *l) {
 	lua_setfield(l, LUA_REGISTRYINDEX, "enet_peers");
 	lua_setfield(l, LUA_REGISTRYINDEX, "enet_peers");
 
 
 	luaL_register(l, "enet", enet_funcs);
 	luaL_register(l, "enet", enet_funcs);
-	return 0;
+
+	// return the enet table created with luaL_register
+	return 1;
 }
 }