diff --git a/rtfs/lib/rtfs.lua b/rtfs/lib/rtfs.lua index 0d98efa..40aeb6e 100644 --- a/rtfs/lib/rtfs.lua +++ b/rtfs/lib/rtfs.lua @@ -395,7 +395,7 @@ function proxy:readHandle(h,s) 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 + elseif handle.currentSector == handle.ft[3] - 1 then local rb = self.d.readSector(handle.ft[2] + handle.currentSector):gsub("\0+$","") else return nil