mirror of
https://github.com/gvx/bitser.git
synced 2024-11-11 01:44:21 +00:00
Fix #1 with the solution by @pgimeno
This commit is contained in:
parent
e817e4de28
commit
214ad35f62
@ -370,7 +370,10 @@ end, loadLoveFile = function(fname)
|
||||
local serializedData, error = love.filesystem.newFileData(fname)
|
||||
assert(serializedData, error)
|
||||
Buffer_newDataReader(serializedData:getPointer(), serializedData:getSize())
|
||||
return deserialize_value({})
|
||||
local value = deserialize_value({})
|
||||
-- serializedData needs to not be collected early in a tail-call
|
||||
-- so make sure deserialize_value returns before loadLoveFile does
|
||||
return value
|
||||
end, loadData = function(data, size)
|
||||
Buffer_newDataReader(data, size)
|
||||
return deserialize_value({})
|
||||
|
Loading…
Reference in New Issue
Block a user