no longer strip nulls from the end of all sectors, only the last one. still trying to figure out a nice way to handle it properly.
This commit is contained in:
parent
afbf6eaa7a
commit
ad8a4813ee
@ -392,14 +392,16 @@ function proxy:writeHandle(h,s)
|
||||
return true
|
||||
end
|
||||
function proxy:readHandle(h,s)
|
||||
local handle = self.handles[h]
|
||||
if handle.currentSector <= handle.ft[3] - 1 then
|
||||
local handle, rb = self.handles[h]
|
||||
if handle.currentSector < handle.ft[3] - 1 then
|
||||
local rb = self.d.readSector(handle.ft[2] + handle.currentSector)
|
||||
if handle.currentSector == handle.ft[3] - 1 then
|
||||
local rb = self.d.readSector(handle.ft[2] + handle.currentSector):gsub("\0+$","")
|
||||
handle.currentSector = handle.currentSector + 1
|
||||
return rb
|
||||
else
|
||||
return nil
|
||||
end
|
||||
handle.currentSector = handle.currentSector + 1
|
||||
return rb
|
||||
end
|
||||
|
||||
-- primarily for debugging
|
||||
|
Loading…
Reference in New Issue
Block a user