Summary: std.getopt.getopt: one-letter hash option causes range
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Maksim Zholudev <> 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:
------- You are receiving this mail because: -------

Reply via email to