diff options
author | Pixel <pixel@nobis-crew.org> | 2010-01-07 11:22:59 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2010-01-07 11:22:59 -0800 |
commit | 438ffb16155217a229128d3ad266d8320aba69ed (patch) | |
tree | c8a7ad67ade7a9cb2eec49a431d4a331bf8a5b3a | |
parent | 628ed8138210d0f67cc35835f6fba96fcc7d932f (diff) |
Hexview shouldn't try working on a file without size.
-rw-r--r-- | iupe-hexview.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/iupe-hexview.lua b/iupe-hexview.lua index a6817d9..9928e76 100644 --- a/iupe-hexview.lua +++ b/iupe-hexview.lua @@ -407,7 +407,9 @@ iupep.hexview = { updatehandle = function (self, handle) self.handle = handle - self.filesize = handle and handle:getsize() or 0 + local filesize = handle and handle:getsize() or 0 + if filesize < 0 then self.handle = nil filesize = 0 end + self.filesize = filesize self.old_max_bytes = -1 self.old_filecursor = -1 self:updatescrollbar() |