summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-09-27 09:44:56 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-09-27 09:44:56 (GMT)
commit0f5c9c8a346e3b691776746c83dfa947b2f41fd6 (patch)
treea0d891a9c2690d226a68104914880951973941bd
parent41f3276be0691e2867d69d5b0f47004312f5d72a (diff)
downloadtcl-0f5c9c8a346e3b691776746c83dfa947b2f41fd6.zip
tcl-0f5c9c8a346e3b691776746c83dfa947b2f41fd6.tar.gz
tcl-0f5c9c8a346e3b691776746c83dfa947b2f41fd6.tar.bz2
Unbreak TCL_ARGV_AUTO_REST macro, found during testing.
-rw-r--r--generic/tclIndexObj.c9
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) {