diff --git a/lib/idl/ast.rb b/lib/idl/ast.rb index e113b0ee1..ec9f87740 100644 --- a/lib/idl/ast.rb +++ b/lib/idl/ast.rb @@ -1803,7 +1803,7 @@ def execute(symtab) var = symtab.get(lhs.text_value) value_result = value_try do v = rhs.value(symtab) - var.value = (lhs.value & ~0) | ((v & 1) << idx.value(symtab)) + var.value = (lhs.value(symtab) & ~0) | ((v & 1) << idx.value(symtab)) end value_else(value_result) do var.value = nil