Fixed error messages in functions where love.filesystem.newFile(Data) is called internally

This commit is contained in:
Alex Szpakowski
2013-05-23 17:59:15 -03:00
parent 7959158ffa
commit 4dc2072fc6
4 changed files with 40 additions and 7 deletions
+5 -1
View File
@@ -20,7 +20,11 @@ freely, subject to the following restrictions:
function love.audio.newSource(a, b)
if type(a) == "string" then
a = love.filesystem.newFileData(a)
local err
a, err = love.filesystem.newFileData(a)
if not a then
error(err, 2)
end
end
if type(a) == "userdata" then
if a:typeOf("File") or a:typeOf("FileData") then