Menu

#3863 TclCompileEnsemble error ?

obsolete: 8.5b3
closed-fixed
8
2007-12-06
2007-12-06
Don Porter
No

Check me on this, but at line 6360
of tclCompCmds.c in TclCompileEnsemble(),
I see:

memcpy(synthetic.tokenPtr + 2, argTokensPtr,
sizeof(Tcl_Token) * (synthetic.numTokens - 2));

and I think that should be:

memcpy(synthetic.tokenPtr + 2*len, argTokensPtr,
sizeof(Tcl_Token) * (synthetic.numTokens - 2*len));

Probably all of the core ensembles that
get compiled have (len == 1) so no problem
so far, but if the aim is a general facility,
multi-word subcommand targets should be
done right.

Discussion

  • Don Porter

    Don Porter - 2007-12-06

    Logged In: YES
    user_id=80530
    Originator: YES

    Less important, but I see some
    comments in the routine referring
    to [info exists] that appear to
    be out of date as well?

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902
    Originator: NO

    Darn, it should be 2*len indeed.

     
  • Donal K. Fellows

    • status: open --> closed-fixed