Skip to content

Commit

Permalink
Update IfcTokenStream.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
beachtom committed Sep 8, 2023
1 parent e8e1b15 commit fe24808
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/wasm/parsing/IfcTokenStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ namespace webifc::parsing
}
auto length = _cChunk->Read<uint16_t>(_readPtr);
Forward(2);
auto str = _cChunk->ReadString(_readPtr,length);
Forward(length);
return str;
if (length > 0)
{
auto str = _cChunk->ReadString(_readPtr,length);
Forward(length);
return str;
}
return "";
}

void IfcTokenStream::Forward(const size_t size)
Expand Down

0 comments on commit fe24808

Please sign in to comment.