Fix cache map load bug

* Fix bug where the version wasn't read correctly during cache map load.
* Pass address of array to CIOStream Read wrapper.
This commit is contained in:
Kawe Mazidjatari 2022-12-02 00:28:01 +01:00
parent 053f284029
commit 9c2b2b681a

View File

@ -497,7 +497,7 @@ bool SigDB_Init()
}
sigDbHeader.m_nVersion = sigDbStream.Read<int>();
if (sigDbHeader.m_nMagic != SIGDB_VERSION)
if (sigDbHeader.m_nVersion != SIGDB_VERSION)
{
return false;
}
@ -509,7 +509,7 @@ bool SigDB_Init()
vData.resize(nSize);
uint8_t* pBuf = vData.data();
sigDbStream.Read<uint8_t*>(pBuf, nSize);
sigDbStream.Read<uint8_t>(*pBuf, nSize);
if (!g_SigCache.m_Cache.ParseFromArray(pBuf, nSize))
{