mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 22:20:33 +00: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;
|
||||
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
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user