mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix stack overflow error
This commit is contained in:
parent
372214ab73
commit
507ff7ac93
2 changed files with 2 additions and 0 deletions
|
|
@ -639,6 +639,7 @@ namespace lua {
|
||||||
inline void call_internal(lua::State* L, const std::string& name) {
|
inline void call_internal(lua::State* L, const std::string& name) {
|
||||||
if (lua::get_from_registry(L, lua::INTERNALS_TABLE, name, true)) {
|
if (lua::get_from_registry(L, lua::INTERNALS_TABLE, name, true)) {
|
||||||
lua::call_nothrow(L, 0, 0);
|
lua::call_nothrow(L, 0, 0);
|
||||||
|
pop(L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -334,6 +334,7 @@ void scripting::on_world_tick(int tps) {
|
||||||
if (lua::get_from_registry(L, lua::INTERNALS_TABLE, "on_world_tick", true)) {
|
if (lua::get_from_registry(L, lua::INTERNALS_TABLE, "on_world_tick", true)) {
|
||||||
lua::pushinteger(L, tps);
|
lua::pushinteger(L, tps);
|
||||||
lua::call_nothrow(L, 1, 0);
|
lua::call_nothrow(L, 1, 0);
|
||||||
|
lua::pop(L);
|
||||||
}
|
}
|
||||||
for (auto& pack : content_control->getAllContentPacks()) {
|
for (auto& pack : content_control->getAllContentPacks()) {
|
||||||
lua::emit_event(L, pack.id + ":.worldtick");
|
lua::emit_event(L, pack.id + ":.worldtick");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue