add gui.alert & critical fixes

This commit is contained in:
MihailRis
2025-01-02 21:59:18 +03:00
parent b9ff1db086
commit a3d35cd10f
7 changed files with 52 additions and 25 deletions
+4 -4
View File
@@ -241,8 +241,9 @@ runnable lua::create_runnable(State* L) {
return [=]() {
getglobal(L, LAMBDAS_TABLE);
getfield(L, *funcptr);
call_nothrow(L, 0);
pop(L);
if (call_nothrow(L, 0)) {
pop(L);
}
};
}
@@ -253,10 +254,9 @@ supplier<bool> lua::create_simple_handler(State* L) {
getfield(L, *funcptr);
if (call_nothrow(L, 0)) {
bool result = toboolean(L, -1);
pop(L, 2);
pop(L);
return result;
} else {
pop(L);
return false;
}
};