Merge pull request #1532 from Pryaxis/cmdline-fix
Updates the commandline parser to not be broken.
This commit is contained in:
commit
f689d77a5b
2 changed files with 8 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Fixed /savessc not bothering to save ssc data for people who bypass ssc. (@hakusaro)
|
* Fixed /savessc not bothering to save ssc data for people who bypass ssc. (@hakusaro)
|
||||||
* Default permission sets for new databases are more modern. (@hakusaro)
|
* Default permission sets for new databases are more modern. (@hakusaro)
|
||||||
* Added the ability to ban by account name instead of just banning a character name assuming its an account name. (@hakusaro)
|
* Added the ability to ban by account name instead of just banning a character name assuming its an account name. (@hakusaro)
|
||||||
|
* Fixed a bug in the CommandLineParser which caused some command lines to fail (@QuicM)
|
||||||
* Renamed TShock.DB.User to TShock.DB.UserAccount, including all the related methods, classes and events. (@Ryozuki)
|
* Renamed TShock.DB.User to TShock.DB.UserAccount, including all the related methods, classes and events. (@Ryozuki)
|
||||||
* Update OTAPI to 2.0.0.31, which also updates Newtonsoft.Json to 10.0.3 (@Ryozuki)
|
* Update OTAPI to 2.0.0.31, which also updates Newtonsoft.Json to 10.0.3 (@Ryozuki)
|
||||||
* Fixed DumpItems() from trying to dump older versions of certain items (negative item IDs). (@Zaicon)
|
* Fixed DumpItems() from trying to dump older versions of certain items (negative item IDs). (@Zaicon)
|
||||||
|
|
|
||||||
|
|
@ -165,10 +165,16 @@ namespace TShockAPI.CLI
|
||||||
{
|
{
|
||||||
_source = source;
|
_source = source;
|
||||||
|
|
||||||
for (int i = 0; i < (source.Length - 1 == 0 ? 1 : source.Length - 1); i++)
|
for (int i = 0; i < (source.Length - 1 == 0 ? 1 : source.Length); i++)
|
||||||
{
|
{
|
||||||
string flag = source[i].ToLowerInvariant();
|
string flag = source[i].ToLowerInvariant();
|
||||||
string argument = null;
|
string argument = null;
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(flag))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (i + 1 < source.Length)
|
if (i + 1 < source.Length)
|
||||||
{
|
{
|
||||||
argument = source[i + 1];
|
argument = source[i + 1];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue