Fix off-by-one in TPTScriptInterface::tptS_set (#715)
This commit is contained in:
parent
3fc6b38111
commit
87ee7a54e1
@ -320,7 +320,7 @@ AnyType TPTScriptInterface::tptS_set(std::deque<String> * words)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
partIndex = ((NumberType)selector).Value();
|
partIndex = ((NumberType)selector).Value();
|
||||||
if(partIndex<0 || partIndex>NPART || sim->parts[partIndex].type==0)
|
if(partIndex<0 || partIndex>=NPART || sim->parts[partIndex].type==0)
|
||||||
throw GeneralException("Invalid particle");
|
throw GeneralException("Invalid particle");
|
||||||
|
|
||||||
switch(propertyFormat)
|
switch(propertyFormat)
|
||||||
|
Loading…
Reference in New Issue
Block a user