1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Fix skip DATA in cell ref loading

This commit is contained in:
elsid 2022-04-10 13:35:54 +02:00
parent 6b464a9330
commit c3a924de23
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40
2 changed files with 8 additions and 1 deletions

View File

@ -116,7 +116,7 @@ namespace ESM
if constexpr (load)
esm.getHTSized<24>(cellRef.mPos);
else
esm.skip(24);
esm.skipHTSized<24, decltype(cellRef.mPos)>();
break;
case ESM::fourCC("NAM0"):
{

View File

@ -155,6 +155,13 @@ public:
getHT(x);
}
template <std::size_t size, typename T>
void skipHTSized()
{
static_assert(sizeof(T) == size);
skipHT<T>();
}
// Read a string by the given name if it is the next record.
std::string getHNOString(NAME name);