Fix argument handling in connect_rpc
authorClaire Xenia Wolf <claire@symbioticeda.com>
Mon, 19 Oct 2020 11:40:57 +0000 (13:40 +0200)
committerClaire Xenia Wolf <claire@symbioticeda.com>
Mon, 19 Oct 2020 11:40:57 +0000 (13:40 +0200)
Signed-off-by: Claire Xenia Wolf <claire@symbioticeda.com>
frontends/rpc/rpc_frontend.cc

index 5a40001cb467feca596f906e0f9159a5e44993a9..c12640ef055eaa4a1ac6ed006b24757cac9649ab 100644 (file)
@@ -401,10 +401,11 @@ struct RpcFrontend : public Pass {
                        std::string arg = args[argidx];
                        if (arg == "-exec" && argidx+1 < args.size()) {
                                command.insert(command.begin(), args.begin() + argidx + 1, args.end());
+                               argidx = args.size()-1;
                                continue;
                        }
                        if (arg == "-path" && argidx+1 < args.size()) {
-                               path = args[argidx+1];
+                               path = args[++argidx];
                                continue;
                        }
                        break;