mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Replace another assert with a throw
This commit is contained in:
parent
2ab5b8e7b0
commit
44a65512e8
@ -30,7 +30,6 @@
|
|||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
#include <cfloat> // FLT_MAX for gcc
|
#include <cfloat> // FLT_MAX for gcc
|
||||||
#include <iostream> // FIXME: debug only
|
#include <iostream> // FIXME: debug only
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -140,7 +139,8 @@ void ESM4::Cell::load(ESM4::Reader& reader)
|
|||||||
reader.get(mCellFlags);
|
reader.get(mCellFlags);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(subHdr.dataSize == 1 && "CELL unexpected DATA flag size");
|
if (subHdr.dataSize != 1)
|
||||||
|
throw std::runtime_error("CELL unexpected DATA flag size");
|
||||||
reader.get(&mCellFlags, sizeof(std::uint8_t));
|
reader.get(&mCellFlags, sizeof(std::uint8_t));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user