diff --git a/src/logic/CommandsInterpreter.cpp b/src/logic/CommandsInterpreter.cpp index 8aa28cdf..da8e6957 100644 --- a/src/logic/CommandsInterpreter.cpp +++ b/src/logic/CommandsInterpreter.cpp @@ -295,11 +295,13 @@ public: while (hasNext()) { bool relative = false; + dynamic::Value value = dynamic::NONE; if (peek() == '~') { relative = true; + value = 0; nextChar(); } - dynamic::Value value = dynamic::NONE; + if (hasNext() && peekNoJump() != ' ') { value = parseValue(); @@ -317,6 +319,9 @@ public: if (arg == nullptr) { throw error("extra positional argument"); } + if (arg->origin.index() && relative) { + break; + } } while (!typeCheck(arg, value)); if (relative) {