1
0
Fork 0

PUICompat: fix default value in configValue()

This commit is contained in:
James Turner 2023-01-11 11:45:01 +00:00
parent de40779109
commit 2be54f9eae

View file

@ -241,7 +241,7 @@ naRef PUICompatObject::config() const
naRef PUICompatObject::nasalGetConfigValue(const nasal::CallContext ctx) const
{
auto name = ctx.requireArg<std::string>(0);
naRef defaultVal = ctx.getArg(0, naNil());
naRef defaultVal = ctx.getArg(1, naNil());
SGPropertyNode_ptr nd = _config->getChild(name);
if (!nd || !nd->hasValue())
return defaultVal;