mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
Replace another assert with a throw
This commit is contained in:
parent
2ab5b8e7b0
commit
44a65512e8
@ -30,7 +30,6 @@
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
#include <cfloat> // FLT_MAX for gcc
|
||||
#include <iostream> // FIXME: debug only
|
||||
#include <limits>
|
||||
@ -140,7 +139,8 @@ void ESM4::Cell::load(ESM4::Reader& reader)
|
||||
reader.get(mCellFlags);
|
||||
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));
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user