diff options
author | Pixel <pixel@nobis-crew.org> | 2009-12-19 20:58:26 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-12-19 20:58:26 -0800 |
commit | 01cde00a913188efe5f17b0fa65556d29557a6de (patch) | |
tree | c44fd52557dab208b0f2dfa2af32d988eb2c3f1f | |
parent | 51ba447736a750739a168bc3fed480ff9304c8c0 (diff) |
Properly saving configuration in the extra array, and using it.
-rw-r--r-- | dalos-binaryops.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dalos-binaryops.lua b/dalos-binaryops.lua index cdc54e0..91e1d04 100644 --- a/dalos-binaryops.lua +++ b/dalos-binaryops.lua @@ -24,8 +24,8 @@ Operation: %l|xor|and|or|add|sub|{Binary operation that's going to occur} Maximize: %b[No,Yes]{Check if you want to maximize the output}
]], self.op or 0, self.maximize and 1 or 0)
if accept then
- self.op = operation
- self.maximize = maximize == 1
+ self.extra.op = operation
+ self.extra.maximize = maximize == 1
self:input_change()
end
end,
@@ -82,7 +82,7 @@ Maximize: %b[No,Yes]{Check if you want to maximize the output} 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)
+ local r = self.extra.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
local t = {}
|