Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
CB3DMeshFileLoader: fix string read primitive
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Sep 28, 2023
1 parent c1ed0cf commit 2f43dc7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/Irrlicht/CB3DMeshFileLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,10 +1034,11 @@ bool CB3DMeshFileLoader::readChunkBRUS()
void CB3DMeshFileLoader::readString(core::stringc& newstring)
{
newstring="";
while (B3DFile->getPos() <= B3DFile->getSize())
while (true)
{
c8 character;
B3DFile->read(&character, sizeof(character));
if (B3DFile->read(&character, sizeof(character)) == 0)
return; // eof
if (character==0)
return;
newstring.append(character);
Expand Down

0 comments on commit 2f43dc7

Please sign in to comment.