diff --git a/components/esm4/reader.cpp b/components/esm4/reader.cpp index 18f5cddadf..d2c77919d2 100644 --- a/components/esm4/reader.cpp +++ b/components/esm4/reader.cpp @@ -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