forked from Mirrorlandia_minetest/irrlicht
CB3DMeshFileLoader: fix string read primitive
This commit is contained in:
parent
64688f4490
commit
103ab16679
@ -1034,10 +1034,11 @@ bool CB3DMeshFileLoader::readChunkBRUS()
|
|||||||
void CB3DMeshFileLoader::readString(core::stringc& newstring)
|
void CB3DMeshFileLoader::readString(core::stringc& newstring)
|
||||||
{
|
{
|
||||||
newstring="";
|
newstring="";
|
||||||
while (B3DFile->getPos() <= B3DFile->getSize())
|
while (true)
|
||||||
{
|
{
|
||||||
c8 character;
|
c8 character;
|
||||||
B3DFile->read(&character, sizeof(character));
|
if (B3DFile->read(&character, sizeof(character)) == 0)
|
||||||
|
return; // eof
|
||||||
if (character==0)
|
if (character==0)
|
||||||
return;
|
return;
|
||||||
newstring.append(character);
|
newstring.append(character);
|
||||||
|
Loading…
Reference in New Issue
Block a user