summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-08-08 15:33:34 +0200
committerJeija <norrepli@gmail.com>2012-08-08 15:33:34 +0200
commit0d6749a264dbffcdbc30c9d95b1f443ee7c43c17 (patch)
tree0491c481dcbf725e72f0dc16921fe74839685f1b
parente3d2b07cd56b94d049c753d7f6f8c5d63ce9ac47 (diff)
downloadmesecons-0d6749a264dbffcdbc30c9d95b1f443ee7c43c17.tar
mesecons-0d6749a264dbffcdbc30c9d95b1f443ee7c43c17.tar.gz
mesecons-0d6749a264dbffcdbc30c9d95b1f443ee7c43c17.tar.bz2
mesecons-0d6749a264dbffcdbc30c9d95b1f443ee7c43c17.tar.xz
mesecons-0d6749a264dbffcdbc30c9d95b1f443ee7c43c17.zip
Fix = operator
-rw-r--r--mesecons_microcontroller/init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua
index a9c792d..56e45a3 100644
--- a/mesecons_microcontroller/init.lua
+++ b/mesecons_microcontroller/init.lua
@@ -197,7 +197,10 @@ function yc_command_if_parsecondition(cond, L)
local a = tonumber(cond:sub(i+1, i+1))
if a == nil then break end
if s == "=" then
- cond = string.gsub(cond, b..s..a, tostring(a == b))
+ buf = (a == b)
+ if buf == true then buf = "1" end
+ if buf == false then buf = "0" end
+ cond = string.gsub(cond, b..s..a, buf)
i = 1
l = string.len(cond)
end