mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Fix lines iterator not closing opened files
This commit is contained in:
@@ -524,6 +524,11 @@ namespace physfs
|
|||||||
// Set the beginning of the next line.
|
// Set the beginning of the next line.
|
||||||
if(!file->eof())
|
if(!file->eof())
|
||||||
file->seek(newline+1);
|
file->seek(newline+1);
|
||||||
|
else if(close)
|
||||||
|
{
|
||||||
|
file->close();
|
||||||
|
file->release();
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -534,7 +539,6 @@ namespace physfs
|
|||||||
file->release();
|
file->release();
|
||||||
}
|
}
|
||||||
|
|
||||||
// else: (newline <= 0)
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user