mirror of https://github.com/AxioDL/nod.git
Use correct slash finding function
This commit is contained in:
parent
c1a1d1abc8
commit
19604b2a3b
|
@ -68,7 +68,7 @@ class DiscIONFS : public IDiscIO {
|
|||
/* Validate file path format */
|
||||
using SignedSize = std::make_signed<SystemString::size_type>::type;
|
||||
const auto dotPos = SignedSize(fpin.rfind('.'));
|
||||
const auto slashPos = SignedSize(fpin.rfind("/\\"));
|
||||
const auto slashPos = SignedSize(fpin.find_last_of("/\\"));
|
||||
if (fpin.size() <= 4 || dotPos == -1 || dotPos <= slashPos ||
|
||||
fpin.compare(slashPos + 1, 4, "hif_") ||
|
||||
fpin.compare(dotPos, fpin.size() - dotPos, ".nfs")) {
|
||||
|
|
|
@ -35,7 +35,7 @@ std::unique_ptr<DiscBase> OpenDiscFromImage(SystemStringView path, bool& isWii)
|
|||
|
||||
using SignedSize = std::make_signed<SystemString::size_type>::type;
|
||||
const auto dotPos = SignedSize(path.rfind('.'));
|
||||
const auto slashPos = SignedSize(path.rfind("/\\"));
|
||||
const auto slashPos = SignedSize(path.find_last_of("/\\"));
|
||||
if (magic == nod::SBig((uint32_t)'WBFS')) {
|
||||
discIO = NewDiscIOWBFS(path);
|
||||
isWii = true;
|
||||
|
|
Loading…
Reference in New Issue