mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-31 19:51:45 +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
|
||||
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");
|
||||
|
||||
switch(propertyFormat)
|
||||
|
Reference in New Issue
Block a user