mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 17:29:55 +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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue