diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-09-27 09:44:56 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-09-27 09:44:56 (GMT) |
commit | 0f5c9c8a346e3b691776746c83dfa947b2f41fd6 (patch) | |
tree | a0d891a9c2690d226a68104914880951973941bd /generic/tclIndexObj.c | |
parent | 41f3276be0691e2867d69d5b0f47004312f5d72a (diff) | |
download | tcl-0f5c9c8a346e3b691776746c83dfa947b2f41fd6.zip tcl-0f5c9c8a346e3b691776746c83dfa947b2f41fd6.tar.gz tcl-0f5c9c8a346e3b691776746c83dfa947b2f41fd6.tar.bz2 |
Unbreak TCL_ARGV_AUTO_REST macro, found during testing.
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r-- | generic/tclIndexObj.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 4e04f71..8651542 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -1222,7 +1222,14 @@ Tcl_ParseArgsObjv( objc--; break; case TCL_ARGV_REST: - *((int *) infoPtr->dstPtr) = dstIndex; + /* + * Only store the point where we got to if it's not to be written + * to NULL, so that TCL_ARGV_AUTO_REST works. + */ + + if (infoPtr->dstPtr != NULL) { + *((int *) infoPtr->dstPtr) = dstIndex; + } goto argsDone; case TCL_ARGV_FLOAT: if (objc == 0) { |