mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix minor issue with log_deprecated()
This commit is contained in:
parent
094c433e58
commit
5405a558fd
1 changed files with 4 additions and 3 deletions
|
@ -180,16 +180,17 @@ void log_deprecated(lua_State *L, std::string message, int stack_depth, bool onc
|
||||||
if (mode == DeprecatedHandlingMode::Ignore)
|
if (mode == DeprecatedHandlingMode::Ignore)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
bool log = true;
|
||||||
if (once) {
|
if (once) {
|
||||||
script_log_unique(L, message, warningstream, stack_depth);
|
log = script_log_unique(L, message, warningstream, stack_depth);
|
||||||
} else {
|
} else {
|
||||||
script_log_add_source(L, message, stack_depth);
|
script_log_add_source(L, message, stack_depth);
|
||||||
warningstream << message << std::endl;
|
warningstream << message << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == DeprecatedHandlingMode::Error)
|
if (mode == DeprecatedHandlingMode::Error)
|
||||||
script_error(L, LUA_ERRRUN, NULL, NULL);
|
script_error(L, LUA_ERRRUN, nullptr, nullptr);
|
||||||
else
|
else if (log)
|
||||||
infostream << script_get_backtrace(L) << std::endl;
|
infostream << script_get_backtrace(L) << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue