From 51ba447736a750739a168bc3fed480ff9304c8c0 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sat, 19 Dec 2009 20:55:51 -0800 Subject: Fixed binary ops by swapping its :read results, and forcing a recomputation if configuration occured. --- dalos-binaryops.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dalos-binaryops.lua b/dalos-binaryops.lua index 6949524..cdc54e0 100644 --- a/dalos-binaryops.lua +++ b/dalos-binaryops.lua @@ -26,6 +26,7 @@ Maximize: %b[No,Yes]{Check if you want to maximize the output} if accept then self.op = operation self.maximize = maximize == 1 + self:input_change() end end, @@ -79,8 +80,8 @@ Maximize: %b[No,Yes]{Check if you want to maximize the output} self.h1:seek(self.offset) self.h2:seek(self.offset) - local r1, t1 = self.h1:read(count) - local r2, t2 = self.h2:read(count) + local t1, r1 = self.h1:read(count) + local t2, r2 = self.h2:read(count) local r = self.maximize and math.max(r1, r2) or math.min(r1, r2) self.offset = self.offset + r if r == 0 then self.got_eof = true return 0 end -- cgit v1.2.3