diff options
-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() |