diff options
Diffstat (limited to 'src/callint.c')
-rw-r--r-- | src/callint.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/callint.c b/src/callint.c index 85ee6722710..e404f2ac71a 100644 --- a/src/callint.c +++ b/src/callint.c @@ -473,16 +473,19 @@ invoke it. If KEYS is omitted or nil, the return value of /* Count the number of arguments the interactive spec would have us give to the function. */ tem = string; - for (j = 0; *tem; j++) + for (j = 0; *tem;) { /* 'r' specifications ("point and mark as 2 numeric args") produce *two* arguments. */ - if (*tem == 'r') j++; + if (*tem == 'r') + j += 2; + else + j++; tem = (unsigned char *) index (tem, '\n'); if (tem) - tem++; + ++tem; else - tem = (unsigned char *) ""; + break; } count = j; |