mirror of https://github.com/bsnes-emu/bsnes.git
Fix a crash in heuristic memory mapping.
Commit 712ed9b6b0
changed the way that the Sufami
Turbo base cartridge was detected, but it caused crashes. Apparently the way we
were converting the binary ROM data to a string for comparison, was actually
calling the wrong `string` constructor. Let's more explicitly create a
string_view instead of hoping for the compiler to pick a suitable constructor
chain.
This commit is contained in:
parent
712ed9b6b0
commit
0fd8f56a6e
|
@ -271,7 +271,7 @@ auto SuperFamicom::board() const -> string {
|
||||||
//Bishoujo Senshi Sailor Moon SuperS - Fuwafuwa Panic (Japan)
|
//Bishoujo Senshi Sailor Moon SuperS - Fuwafuwa Panic (Japan)
|
||||||
//so we identify it with this embedded string
|
//so we identify it with this embedded string
|
||||||
string sufamiSignature = "BANDAI SFC-ADX";
|
string sufamiSignature = "BANDAI SFC-ADX";
|
||||||
if (string(data.view(0, sufamiSignature.length())) == sufamiSignature) board.append("ST-", mode);
|
if (string_view(data.data(), sufamiSignature.length()) == sufamiSignature) board.append("ST-", mode);
|
||||||
|
|
||||||
//this game's title ovewrites the map mode with '!' (0x21), but is a LOROM game
|
//this game's title ovewrites the map mode with '!' (0x21), but is a LOROM game
|
||||||
if(title() == "YUYU NO QUIZ DE GO!GO") mode = "LOROM-";
|
if(title() == "YUYU NO QUIZ DE GO!GO") mode = "LOROM-";
|
||||||
|
|
Loading…
Reference in New Issue