mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-23 00:12:51 +02:00
fix !load -1 crash
This commit is contained in:
@@ -439,10 +439,14 @@ AnyType TPTScriptInterface::tptS_load(std::deque<std::string> * words)
|
|||||||
//Arguments from stack
|
//Arguments from stack
|
||||||
NumberType saveID = eval(words);
|
NumberType saveID = eval(words);
|
||||||
|
|
||||||
|
if (saveID.Value() > 0)
|
||||||
|
{
|
||||||
c->OpenSavePreview(saveID.Value(), 0, false);
|
c->OpenSavePreview(saveID.Value(), 0, false);
|
||||||
|
|
||||||
return NumberType(0);
|
return NumberType(0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
throw GeneralException("Invalid save ID");
|
||||||
|
}
|
||||||
|
|
||||||
AnyType TPTScriptInterface::tptS_bubble(std::deque<std::string> * words)
|
AnyType TPTScriptInterface::tptS_bubble(std::deque<std::string> * words)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user