(svn r15046) -Fix (r15045): in case CanLoadFromRevision does not exist, only allow savedata from the same version as we are now

This commit is contained in:
truebrain 2009-01-13 01:50:51 +00:00
parent bcbbf2c366
commit e06e372529

View File

@ -73,7 +73,7 @@ const char *AIFileInfo::GetInstanceName()
bool AIFileInfo::CanLoadFromVersion(int version) bool AIFileInfo::CanLoadFromVersion(int version)
{ {
if (version == -1) return true; if (version == -1) return true;
if (!this->engine->MethodExists(*this->SQ_instance, "CanLoadFromVersion")) return true; if (!this->engine->MethodExists(*this->SQ_instance, "CanLoadFromVersion")) return (version == this->GetVersion());
HSQUIRRELVM vm = this->engine->GetVM(); HSQUIRRELVM vm = this->engine->GetVM();
int top = sq_gettop(vm); int top = sq_gettop(vm);