fix !load -1 crash

This commit is contained in:
jacob1
2013-09-13 12:53:40 -04:00
parent aa2ec3d162
commit 830bb3ba5e

View File

@@ -439,9 +439,13 @@ 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)