mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
fix fatal error on wrong placement args
This commit is contained in:
parent
cd949126b2
commit
6e6f9616cd
1 changed files with 14 additions and 10 deletions
|
|
@ -196,21 +196,25 @@ public:
|
||||||
|
|
||||||
stackguard _(L);
|
stackguard _(L);
|
||||||
pushenv(L, *env);
|
pushenv(L, *env);
|
||||||
if (getfield(L, "place_structures_wide")) {
|
try {
|
||||||
pushivec_stack(L, offset);
|
if (getfield(L, "place_structures_wide")) {
|
||||||
pushivec_stack(L, size);
|
pushivec_stack(L, offset);
|
||||||
pushinteger(L, chunkHeight);
|
pushivec_stack(L, size);
|
||||||
if (call_nothrow(L, 5, 1)) {
|
pushinteger(L, chunkHeight);
|
||||||
int len = objlen(L, -1);
|
if (call_nothrow(L, 5, 1)) {
|
||||||
for (int i = 1; i <= len; i++) {
|
int len = objlen(L, -1);
|
||||||
rawgeti(L, i);
|
for (int i = 1; i <= len; i++) {
|
||||||
|
rawgeti(L, i);
|
||||||
|
|
||||||
perform_placement(L, placements);
|
perform_placement(L, placements);
|
||||||
|
|
||||||
|
pop(L);
|
||||||
|
}
|
||||||
pop(L);
|
pop(L);
|
||||||
}
|
}
|
||||||
pop(L);
|
|
||||||
}
|
}
|
||||||
|
} catch (const std::runtime_error& err) {
|
||||||
|
logger.error() << err.what();
|
||||||
}
|
}
|
||||||
return placements;
|
return placements;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue