Don't remove from queue on failure in quoted string parser
This commit is contained in:
parent
484c97ca98
commit
18fc685c70
1 changed files with 3 additions and 1 deletions
|
|
@ -360,11 +360,13 @@ public final class StringArgument<C> extends CommandArgument<C, String> {
|
||||||
inputQueue.remove();
|
inputQueue.remove();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
inner = inputQueue.remove();
|
inner = inputQueue.peek();
|
||||||
if (inner.startsWith("\"") || inner.startsWith("'")) {
|
if (inner.startsWith("\"") || inner.startsWith("'")) {
|
||||||
return ArgumentParseResult.failure(new StringParseException(sj.toString(),
|
return ArgumentParseResult.failure(new StringParseException(sj.toString(),
|
||||||
StringMode.QUOTED, commandContext
|
StringMode.QUOTED, commandContext
|
||||||
));
|
));
|
||||||
|
} else {
|
||||||
|
inputQueue.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue