[Issue 5762] New: getopt: short option parameter read incorrectly when bundling enabled

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 21 10:14:49 PDT 2011


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

           Summary: getopt: short option parameter read incorrectly when
                    bundling enabled
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: epi at atari8.info


--- Comment #0 from Adrian Matoga <epi at atari8.info> 2011-03-21 10:11:32 PDT ---
Source:

import std.getopt;
import std.stdio;

void main(string args[])
{
    string str;
    getopt(args, config.bundling, "a|addr", &str);
    writeln(str);
}

Invoked with short (single-dash) option reads parameter incorrectly.
>test.exe -a=-0x12
-=

With double dash it's ok.
>test.exe --a=-0x12
-0x12

Works also when bundling is disabled.

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


More information about the Digitalmars-d-bugs mailing list