From 60006de9f0a57943675385461583c38757d74f04 Mon Sep 17 00:00:00 2001 From: Robin Wellner Date: Tue, 23 Feb 2016 13:15:53 +0100 Subject: [PATCH] Oops --- bitser.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bitser.lua b/bitser.lua index d3518a0..c04d0ad 100644 --- a/bitser.lua +++ b/bitser.lua @@ -246,7 +246,6 @@ local function serialize(value) Buffer_makeBuffer(4096) local seen = {len = 0} serialize_value(value, seen) - return buf, buf_pos end local function add_to_seen(value, seen) @@ -357,10 +356,10 @@ end return {dumps = function(value) serialize(value) - return ffi.string(buf, buf_size) + return ffi.string(buf, buf_pos) end, dumpLoveFile = function(fname, value) serialize(value) - love.filesystem.write(fname, ffi.string(buf, buf_size)) + love.filesystem.write(fname, ffi.string(buf, buf_pos)) end, loadLoveFile = function(fname) local serializedData = love.filesystem.newFileData(fname) Buffer_newDataReader(serializedData:getPointer(), serializedData:getSize())