www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17574] New: Range violation in std.getopt:getopt AA parsing

https://issues.dlang.org/show_bug.cgi?id=17574

          Issue ID: 17574
           Summary: Range violation in std.getopt:getopt AA parsing
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: briancschott gmail.com

I discovered this while trying to figure out how to include commas in argument
values:

```
import std.getopt;
import std.stdio;

void main()
{
    string[string] mapping;
    arraySep = ",";
    string[] args = [
        "testProgram",
        "-m",
        "a=b,c=\"d,e,f\""
    ];
    args.getopt("m", &mapping);
    writeln(mapping);
}

```

--
Jun 29