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
|
@ -18,7 +18,7 @@ namespace ESM
|
|||
while (esm.hasMoreSubs())
|
||||
{
|
||||
esm.getSubName();
|
||||
switch (esm.retSubName().intval)
|
||||
switch (esm.retSubName().toInt())
|
||||
{
|
||||
case ESM::SREC_NAME:
|
||||
mId = esm.getHString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue