Bugfix in expression parser of read_liberty
authorClifford Wolf <clifford@clifford.at>
Sat, 15 Feb 2014 18:36:09 +0000 (19:36 +0100)
committerClifford Wolf <clifford@clifford.at>
Sat, 15 Feb 2014 18:36:09 +0000 (19:36 +0100)
frontends/liberty/liberty.cc

index 220f32f5e9cf59705bdb50e1f62d6d67f133b56d..ca899cb95fe4c912a7b8c8d69da9c1071b60a3b7 100644 (file)
@@ -143,8 +143,7 @@ static bool parse_func_reduce(RTLIL::Module *module, std::vector<token_t> &stack
        }
 
        if (0 <= top-1 && stack[top-1].type == 2 && stack[top].type == 2) {
-               token_t t = token_t(2, create_and_cell(module, stack[top-2].sig, stack[top].sig));
-               stack.pop_back();
+               token_t t = token_t(2, create_and_cell(module, stack[top-1].sig, stack[top].sig));
                stack.pop_back();
                stack.pop_back();
                stack.push_back(t);