[Fix] 修复引号包括的参数值尾部多余的引号没有过滤的问题;

This commit is contained in:
LamGC 2020-03-31 11:17:13 +08:00
parent 3333f4c5c5
commit 64303dc6b6

View File

@ -89,13 +89,13 @@ public class CQPluginMain extends CQPlugin {
int startIndex = 0; int startIndex = 0;
int endIndex = arg.length(); int endIndex = arg.length();
if(arg.startsWith("\"")) { if(arg.startsWith("\"")) {
while(arg.indexOf("\"") == startIndex) { while(arg.indexOf("\"", startIndex) == startIndex) {
startIndex++; startIndex++;
} }
} }
if(arg.endsWith("\"")) { if(arg.endsWith("\"")) {
while(arg.lastIndexOf("\"") == endIndex - 1) { while(arg.charAt(endIndex - 1) == '\"') {
endIndex--; endIndex--;
} }
} }