mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix quote detection in /setrnd (#1915)
* Fix quote detection in /setrnd Before the function crashed when entering quoted strings. * Fix indentation * Fix out of array error
This commit is contained in:
parent
bbe000b640
commit
095c9cf137
2 changed files with 2 additions and 5 deletions
|
|
@ -107,7 +107,7 @@ namespace MinecraftClient
|
||||||
|
|
||||||
for (int i = 0; i < cmdLine.Length; i++)
|
for (int i = 0; i < cmdLine.Length; i++)
|
||||||
{
|
{
|
||||||
if (cmdLine[i] == '"' && cmdLine[i - 1] != '\\')
|
if ((cmdLine[i] == '"' && i > 0 && cmdLine[i-1] != '\\') || (cmdLine[i] == '"' && i == 0))
|
||||||
{
|
{
|
||||||
if (inQuotedArg)
|
if (inQuotedArg)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
|
@ -72,7 +71,5 @@ namespace MinecraftClient.Commands
|
||||||
}
|
}
|
||||||
else return GetCmdDescTranslated();
|
else return GetCmdDescTranslated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue