aboutsummaryrefslogtreecommitdiffstats
path: root/WWW/Library/Implementation/HTString.c
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation/HTString.c')
-rw-r--r--WWW/Library/Implementation/HTString.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index 9a89afdf..6beb2f44 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -813,14 +813,19 @@ PUBLIC void HTAddParam ARGS4(
/*
* Append the remaining command-string to a system command (compare with
- * HTAddParam). Any remaining "%s" tokens are copied as-is.
+ * HTAddParam). Any remaining "%s" tokens are copied as empty strings.
*/
PUBLIC void HTEndParam ARGS3(
char **, result,
CONST char *, command,
int, number)
{
- CONST char *last = HTAfterCommandArg(command, number);
+ CONST char *last;
+ int count;
+ count = HTCountCommandArgs (command);
+ if (count < number)
+ number = count;
+ last = HTAfterCommandArg(command, number);
if (last[0] != 0) {
HTSACat(result, last);
}