mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-27 08:11:55 +00:00
Checking rom size before checking SPC header
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user