diff --git a/contrib/openddlparser/code/OpenDDLParser.cpp b/contrib/openddlparser/code/OpenDDLParser.cpp index 1e14f5fd0..e065f9410 100644 --- a/contrib/openddlparser/code/OpenDDLParser.cpp +++ b/contrib/openddlparser/code/OpenDDLParser.cpp @@ -796,10 +796,13 @@ char *OpenDDLParser::parseStringLiteral(char *in, char *end, Value **stringData) if (*start == '\"') { ++start; ++in; - while (*in != '\"' && in != end) { + while (in != end && *in != '\"') { ++in; ++len; } + if (in == end) { + return in; + } *stringData = ValueAllocator::allocPrimData(Value::ValueType::ddl_string, len); ::strncpy((char *)(*stringData)->m_data, start, len);