diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 2c53d759de..3a7c373a7d 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -126,6 +126,9 @@ size_t IfcSpfLexer::skipWhitespace() const { } size_t IfcSpfLexer::skipComment() const { + if (stream->eof()) { + return 0; + } char character = stream->peek(); if (character != '/') { return 0;