Fix mean nasal bug when calling setprop("foo")
Reported on the forum from Thorsten Renk and analyzed by Hooray, fixes this issue: var x="/test/X"; var y="/test/Y"; setprop(x,100); # sets x=100 setprop(y); # sets x=0 setprop(x,100); setprop(200); # sets x=200 by checking for at least 2 parameters for setprop
This commit is contained in:
parent
31a807563b
commit
a5017f218f
1 changed files with 1 additions and 0 deletions
|
@ -212,6 +212,7 @@ static naRef f_setprop(naContext c, naRef me, int argc, naRef* args)
|
|||
buf[BUFLEN] = 0;
|
||||
char* p = buf;
|
||||
int buflen = BUFLEN;
|
||||
if(argc < 2) naRuntimeError(c, "setprop() expects at least 2 arguments");
|
||||
for(int i=0; i<argc-1; i++) {
|
||||
naRef s = naStringValue(c, args[i]);
|
||||
if(naIsNil(s)) return naNil();
|
||||
|
|
Loading…
Add table
Reference in a new issue