Fixes spotted by Florent
This commit is contained in:
parent
3bac8b93f2
commit
bd66bfb696
1 changed files with 2 additions and 3 deletions
|
@ -176,7 +176,7 @@ static naRef f_setAttribute(naContext c, naRef me, int argc, naRef* args)
|
||||||
{
|
{
|
||||||
NODEARG();
|
NODEARG();
|
||||||
if (node->getAttribute(SGPropertyNode::PROTECTED)) {
|
if (node->getAttribute(SGPropertyNode::PROTECTED)) {
|
||||||
naRuntimeError(c, "props.setAttribute() called on proptected property %s",
|
naRuntimeError(c, "props.setAttribute() called on protected property %s",
|
||||||
node->getPath().c_str());
|
node->getPath().c_str());
|
||||||
return naNil();
|
return naNil();
|
||||||
}
|
}
|
||||||
|
@ -637,8 +637,7 @@ static naRef f_removeChild(naContext c, naRef me, int argc, naRef* args)
|
||||||
n = node->getChild(naStr_data(child), (int)index.num);
|
n = node->getChild(naStr_data(child), (int)index.num);
|
||||||
if (n && n->getAttribute(SGPropertyNode::PROTECTED)) {
|
if (n && n->getAttribute(SGPropertyNode::PROTECTED)) {
|
||||||
naRuntimeError(c, "props.Node.removeChild() called on protected child %s of %s",
|
naRuntimeError(c, "props.Node.removeChild() called on protected child %s of %s",
|
||||||
node->getPath().c_str(),
|
naStr_data(child), node->getPath().c_str());
|
||||||
naStr_data(child));
|
|
||||||
return naNil();
|
return naNil();
|
||||||
}
|
}
|
||||||
n = node->removeChild(naStr_data(child), (int)index.num);
|
n = node->removeChild(naStr_data(child), (int)index.num);
|
||||||
|
|
Loading…
Add table
Reference in a new issue