mirror of
https://github.com/minetest/irrlicht.git
synced 2025-03-06 20:49:24 +01:00
CB3DMeshFileLoader: fix string read primitive
This commit is contained in:
parent
64688f4490
commit
103ab16679
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue