Fix lines iterator not closing opened files

This commit is contained in:
Bart van Strien
2011-08-06 13:36:22 +02:00
parent 69f12bf899
commit 9ed5906416
+5 -1
View File
@@ -524,6 +524,11 @@ namespace physfs
// Set the beginning of the next line.
if(!file->eof())
file->seek(newline+1);
else if(close)
{
file->close();
file->release();
}
return 1;
}
@@ -534,7 +539,6 @@ namespace physfs
file->release();
}
// else: (newline <= 0)
return 0;
}