mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-08 23:16:39 +00:00
Merge branch 'assert_throw' into 'master'
Replace an `assert` with a conditional throw See merge request OpenMW/openmw!3038
This commit is contained in:
commit
08dc48586e
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue