mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +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
@ -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