diff --git a/src/token.c b/src/token.c index 1049c546..8b0e801e 100644 --- a/src/token.c +++ b/src/token.c @@ -1204,6 +1204,11 @@ const char *subst_token(const char *s, const char *tok, const char *new_val) my_strdup2(_ALLOC_ID_, &result, s); return result; } + if( (!s || s[0] == '\0') && tok && new_val) { + my_strdup2(_ALLOC_ID_, &result, tok); + my_mstrcat(_ALLOC_ID_, &result, "=", new_val, NULL); + return result; + } /* quote new_val if it contains newlines and not "name" token */ if(new_val) { new_val_len = strlen(new_val);