Skip to content

Commit aa8bdb4

Browse files
committed
don't load corrupt data
1 parent 87e52e6 commit aa8bdb4

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/Resource/XcomResourcePack.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,15 @@ void XcomResourcePack::loadBattlescapeResources()
791791
_sets[*i] = new SurfaceSet(32, 48);
792792
_sets[*i]->loadPck(path, tab);
793793
}
794-
794+
// incomplete chryssalid set: 1.0 data: stop loading.
795+
if (!_sets["CHRYS.PCK"]->getFrame(225))
796+
{
797+
Log(LOG_FATAL) << "Version 1.0 data detected." << std::endl << std::endl << "please install the official patches" << std::endl
798+
<< "from http://www.strategycore.co.uk/files/ufo-1.2/" << std::endl
799+
<< "and http://www.strategycore.co.uk/files/ufo-1.4/" << std::endl;
800+
;
801+
throw Exception("Invalid data, please check logfile.");
802+
}
795803
s.str("");
796804
s << "GEODATA/" << "LOFTEMPS.DAT";
797805
MapDataSet::loadLOFTEMPS(CrossPlatform::getDataFile(s.str()), &_voxelData);

0 commit comments

Comments
 (0)