http://d.puremagic.com/issues/show_bug.cgi?id=6888

           Summary: std.getopt.getopt: one-letter hash option causes range
                    violation
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: maxim...@gmail.com


--- Comment #0 from Maksim Zholudev <maxim...@gmail.com> 2011-11-03 08:48:03 
PDT ---
The following code causes the error:
--------------------
import std.getopt;

void main()
{
    int[string] foo;
    auto args = ["", "-t", "a=1"];
    getopt(args, "t", &foo);
}
--------------------
core.exception.RangeError@std.getopt(519): Range violation
--------------------

There is no error if bundling is turned on:
getopt(args, config.bundling, "t", &foo);

There is no error if the option contains more than one letter
e.g. "--tune"

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to