mirror of
https://github.com/jakcron/nstool
synced 2024-12-24 21:51:14 +00:00
[nx] NcaHeader signature bytes validation change.
This commit is contained in:
parent
02514cf72b
commit
c02c5650c0
1 changed files with 3 additions and 2 deletions
|
@ -74,11 +74,12 @@ void NcaHeader::importBinary(const byte_t * bytes, size_t len)
|
|||
|
||||
sNcaHeader* hdr = (sNcaHeader*)mBinaryBlob.getBytes();
|
||||
|
||||
if (memcmp(hdr->signature, nca::kNca2Sig.c_str(), 4) == 0)
|
||||
std::string sig = std::string(hdr->signature, 4);
|
||||
if (sig == nca::kNca2Sig)
|
||||
{
|
||||
mFormatVersion = NCA2_FORMAT;
|
||||
}
|
||||
else if (memcmp(hdr->signature, nca::kNca3Sig.c_str(), 4) == 0)
|
||||
else if (sig == nca::kNca3Sig)
|
||||
{
|
||||
mFormatVersion = NCA3_FORMAT;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue