diff options
author | Pixel <pixel@nobis-crew.org> | 2009-12-19 20:55:51 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-12-19 20:55:51 -0800 |
commit | 51ba447736a750739a168bc3fed480ff9304c8c0 (patch) | |
tree | 9b7b1ba1f1ab6e45baf99661e67a03c9d0bb432a | |
parent | af5acc8f85b110afdaf1ae4ddd63fd3a6c2bfef6 (diff) |
Fixed binary ops by swapping its :read results, and forcing a recomputation if configuration occured.
-rw-r--r-- | dalos-binaryops.lua | 5 |
1 files 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
|