diff --git a/src/input.cpp b/src/input.cpp index d374bfc881..549789b870 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -358,15 +358,11 @@ void Input::substitute(char *str, int flag) *ptr = '\0'; strcpy(work,str); - if (strlen(work)+strlen(value) >= MAXLINE) { - sprintf(str,"Input line too long after variable substitution: %s %s",work,value); - error->one(str); - } + if (strlen(work)+strlen(value) >= MAXLINE) + error->one("Input line too long after variable substitution"); strcat(work,value); - if (strlen(work)+strlen(beyond) >= MAXLINE) { - sprintf(str,"Input line too long after variable substitution: %s %s",work,beyond); - error->one(str); - } + if (strlen(work)+strlen(beyond) >= MAXLINE) + error->one("Input line too long after variable substitution"); strcat(work,beyond); strcpy(str,work); ptr += strlen(value);