mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-04 07:47:59 +03:00
Do not use union to access FIXED_STRING<4> as int
https://en.cppreference.com/w/cpp/language/union: > It's undefined behavior to read from the member of the union that wasn't most recently written.
This commit is contained in:
parent
62dfbb33d9
commit
18d3102148
51 changed files with 89 additions and 79 deletions
|
@ -66,7 +66,7 @@ void ESM::CellRef::loadData(ESMReader &esm, bool &isDeleted)
|
|||
while (!isLoaded && esm.hasMoreSubs())
|
||||
{
|
||||
esm.getSubName();
|
||||
switch (esm.retSubName().intval)
|
||||
switch (esm.retSubName().toInt())
|
||||
{
|
||||
case ESM::FourCC<'U','N','A','M'>::value:
|
||||
esm.getHT(mReferenceBlocked);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue