parse function in ParseArgs code problem
akakakakakaa opened this issue · 2 comments
akakakakakaa commented
I'm github newbie. I don't know well how to write issue. Sorry.
It's simple.
in parse function,
for (int i = 0; i < args.Length; ++i)
{
if ((args[i][0] == '-' || args[i][0] == '/')
&& args[i].Length > 1
&& i + i < args.Length)
args.Length condition check i + i. It need to change i + 1.
and
if (args[i].Contains("@"))
{
user = args[i].Substring(0, args[i].IndexOf('@'));
host = args[i].Substring(args[i].IndexOf('@') + 1);
if (host.Contains(":"))
{
root = host.Substring(host.IndexOf(':') + 1);
host = host.Substring(0, host.IndexOf(':'));
}
}
else
{
drive = args[i][0];
}
in this code, drive changes to first character of last option.
Liryna commented
Hi @akakakakakaa ,
Thank you for your report.
Here is the two commit I did releated to this issue:
2478b00
09006d8
Is that alright for you ?
akakakakakaa commented
Ok, Thanks!
and when I use in win10, It is not working. But, I don't know why.
It's another issue. I'll search.