From 9ce69b6bc34655e437feccd89354730c91e5677b Mon Sep 17 00:00:00 2001 From: Pixel Date: Sat, 19 Dec 2009 17:44:13 -0800 Subject: Adding a first stub for binary ops, and fixing hexviewer's ability to destroy its input when going too far in the file. --- dalos-hexview.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dalos-hexview.lua') diff --git a/dalos-hexview.lua b/dalos-hexview.lua index 7e46ed6..b085f12 100644 --- a/dalos-hexview.lua +++ b/dalos-hexview.lua @@ -67,6 +67,8 @@ dalosp.hexview = { else error "Unknown wheel" end + if self.offset < 0 then self.offset = 0 end + if self.offset >= self.size then self.offset = self.size end self.h:seek(self.offset + self.origin) return self.offset end, -- cgit v1.2.3