mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 19:20:49 +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;
|
||||
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