mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-12 22:06:00 -04:00
Replace an asert
with a conditional throw
The assert is reachable, resulting in a brutal `abort` instead of a nice exception.
This commit is contained in:
parent
5b36ea0179
commit
cde7aeac3d
@ -686,7 +686,8 @@ namespace ESM4
|
|||||||
{
|
{
|
||||||
char ch;
|
char ch;
|
||||||
stream.read(&ch, 1); // read the null terminator
|
stream.read(&ch, 1); // read the null terminator
|
||||||
assert(ch == '\0' && "ESM4::Reader::getString string is not terminated with a null");
|
if (ch != '\0')
|
||||||
|
throw std::runtime_error("ESM4::Reader::getString string is not terminated with a null");
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user