1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

NthArgument() question

Discussion in 'Plugins' started by vefatica, Sep 1, 2008.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,792
    Likes Received:
    29
    If I do this,
    WCHAR szClassExpr[128] = L"*";
    and later while parsing a command line,
    else if ( !lstrcmpi(arg, L"/CLASS") )

    NthArgument(psz, (++i) | 0x8800, szClassExpr, NULL);
    and no argument was provided to the "/CLASS" option, then NthArgument() fails (not finding arg ++i) but szClassExpr gets clobbered (winds up with szClassExpr[0] == 0). This clobbering is mildly inconvenient. Can it be used to advantage? Thanks
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    vefatica wrote:

    WAD - the target argument is always cleared, regardless of whether
    there's a matching argument. This will definitely not be changed, as it
    would break most of the internals in TCC & Take Command.

    Rex Conn
    JP Software
     

Share This Page