Changeset 77

Show
Ignore:
Timestamp:
01/11/07 19:18:19 (2 years ago)
Author:
KirkMcDonald
Message:

Bug fix in '--' args not calling leftover callback.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • misc/optparse.d

    r76 r77  
    422422            // -- ends the option list, the remainder is dumped into args 
    423423            if (opt == "--") { 
    424                 options.args ~= args[i+1 .. $]; 
     424                if (this.leftover_cb is null) { 
     425                    foreach(arg; args[i+1 .. $]) { 
     426                        this.leftover_cb(arg); 
     427                    } 
     428                } else { 
     429                    options.args ~= args[i+1 .. $]; 
     430                } 
    425431                i = args.length; 
    426432            } else if (opt.startswith("--")) {