From: andy Date: Wed, 24 Mar 2004 19:06:54 +0000 (+0000) Subject: Forgot to handle "unspecified" properties in getprop(). Treat them X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3ddfd777819e0d95578c96eb30a879f0ff23f730;p=flightgear.git Forgot to handle "unspecified" properties in getprop(). Treat them as strings. --- diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index d198a3a06..a8f913ee6 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -143,12 +143,14 @@ static naRef f_getprop(naContext c, naRef args) return naNum(p->getDoubleValue()); case SGPropertyNode::STRING: + case SGPropertyNode::UNSPECIFIED: { naRef nastr = naNewString(c); const char* val = p->getStringValue(); naStr_fromdata(nastr, (char*)val, strlen(val)); return nastr; } + case SGPropertyNode::ALIAS: // <--- FIXME, recurse? default: return naNil(); }