summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 093f6bed4..3734c94fd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1210,8 +1210,13 @@ static int formparse(struct Configurable *config,
specified and if not we simply assume that it is text that
the user wants included in the type and include that too up
to the next zero or semicolon. */
- if((*sep==';') && !curlx_strnequal(";filname=", sep, 9))
- sep = strchr(sep+1, ';');
+ if((*sep==';') && !curlx_strnequal(";filename=", sep, 10)) {
+ sep2 = strchr(sep+1, ';');
+ if (sep2)
+ sep = sep2;
+ else
+ sep = sep+strlen(sep); /* point to end of string */
+ }
if(*sep) {
*sep=0; /* zero terminate type string */