Corrected option parsing

This commit is contained in:
Stefanos A. 2013-11-13 14:29:06 +01:00
parent 1792f7bf29
commit 4fd5cc30d5

View file

@ -133,13 +133,13 @@ namespace Bind
case "o": case "o":
case "option": case "option":
{ {
string option = val.ToLower(); val = val.ToLower();
bool enable = !opt.StartsWith("-"); bool enable = !opt.StartsWith("-");
if (option.StartsWith("+") || option.StartsWith("-")) if (val.StartsWith("+") || val.StartsWith("-"))
option = option.Substring(1); val = val.Substring(1);
var settings = Settings.Legacy.None; var settings = Settings.Legacy.None;
switch (opt) switch (val)
{ {
case "tao": settings |= Settings.Legacy.Tao; break; case "tao": settings |= Settings.Legacy.Tao; break;
case "simple_enums": settings |= Settings.Legacy.NoAdvancedEnumProcessing; break; case "simple_enums": settings |= Settings.Legacy.NoAdvancedEnumProcessing; break;