Checking rom size before checking SPC header

This commit is contained in:
Melefo
2021-06-23 22:04:07 +02:00
parent bb156d600c
commit caf4197033
+2
View File
@@ -160,6 +160,8 @@ namespace ComSquare::Cartridge
bool Cartridge::_isSPCFile()
{
if (this->_size < 0x25)
return false;
std::string str = std::string(reinterpret_cast<char *>(this->_data), 0x21);
if (str != Cartridge::_magicSPC)