summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index a4309b6..6cd5bb2 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -330,7 +330,9 @@ Tcl_ProcObjCmd(
}
if ((procArgs[0] == 'a') && (strncmp(procArgs, "args", 4) == 0)) {
- procArgs += 4;
+ int numBytes;
+
+ procArgs +=4;
while (*procArgs != '\0') {
if (*procArgs != ' ') {
goto done;
@@ -342,12 +344,9 @@ Tcl_ProcObjCmd(
* The argument list is just "args"; check the body
*/
- procBody = TclGetString(objv[3]);
- while (*procBody != '\0') {
- if (!isspace(UCHAR(*procBody))) {
- goto done;
- }
- procBody++;
+ procBody = Tcl_GetStringFromObj(objv[3], &numBytes);
+ if (TclParseAllWhiteSpace(procBody, numBytes) < numBytes) {
+ goto done;
}
/*