mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
Don't emit Parsing terminated on benign files by not reading past stream in skipComment()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user