From 0fa37fc711bb4ebe928a2a4bb9e9ce87a25bbce0 Mon Sep 17 00:00:00 2001 From: rude Date: Tue, 25 Aug 2009 22:22:55 +0200 Subject: [PATCH] Fixed bug where file was left open when doing a love.filesystem.read. --- src/modules/filesystem/physfs/Filesystem.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/filesystem/physfs/Filesystem.cpp b/src/modules/filesystem/physfs/Filesystem.cpp index 0c2917706..03845890c 100644 --- a/src/modules/filesystem/physfs/Filesystem.cpp +++ b/src/modules/filesystem/physfs/Filesystem.cpp @@ -236,10 +236,9 @@ namespace physfs { // Create the file. file = newFile(lua_tostring(L, 1)); - file->open(File::READ); } else - return luaL_error(L, "Expected filename."); + return luaL_error(L, "Expected filename."); // Optionally, the caller can specify whether to read // the whole file, or just a part of it.