mirror of
https://github.com/JetSetIlly/Gopher2600.git
synced 2024-06-02 20:18:20 -04:00
peripheral fingerprinting only considers the first 64k of cartridge data
This commit is contained in:
parent
8308e4037c
commit
8edee622cc
|
@ -75,7 +75,9 @@ func Fingerprint(port plugging.PortID, loader cartridgeloader.Loader) ports.NewP
|
||||||
|
|
||||||
func matchPattern(patterns [][]byte, loader cartridgeloader.Loader) bool {
|
func matchPattern(patterns [][]byte, loader cartridgeloader.Loader) bool {
|
||||||
for _, p := range patterns {
|
for _, p := range patterns {
|
||||||
if loader.Contains(p) {
|
// limit check to the first 64k of data. any data beyond that is likely
|
||||||
|
// to be non-program data and only likely to return false-positives
|
||||||
|
if loader.ContainsLimit(65536, p) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue