mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-09 15:30:42 +02:00
Fix off-by-one in TPTScriptInterface::tptS_set (#715)
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user