mirror of https://github.com/stella-emu/stella.git
safety fix for unusual small ROMs.
This commit is contained in:
parent
8c8128934c
commit
ff65426954
|
@ -85,6 +85,7 @@ string ControllerDetector::autodetectPort(const uInt8* image, uInt32 size,
|
|||
bool ControllerDetector::searchForBytes(const uInt8* image, uInt32 imagesize,
|
||||
const uInt8* signature, uInt32 sigsize)
|
||||
{
|
||||
if (imagesize >= sigsize)
|
||||
for(uInt32 i = 0; i < imagesize - sigsize; ++i)
|
||||
{
|
||||
uInt32 matches = 0;
|
||||
|
|
Loading…
Reference in New Issue