diff options
Diffstat (limited to 'src/sp_config_keywords.c')
| -rw-r--r-- | src/sp_config_keywords.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index c5cc950..dad538c 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -336,7 +336,18 @@ int parse_disabled_functions(char *line) { | |||
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | if (param) { | 338 | if (param) { |
| 339 | df->param = parse_var(param); | 339 | if (strlen(param) > 0) { |
| 340 | /* This is an ugly hack. We're prefixing with a `$` because otherwise | ||
| 341 | * the parser treats this as a constant. | ||
| 342 | * FIXME: Remote this, and improve our (weird) parser. */ | ||
| 343 | char *new = pecalloc(strlen(param) + 2, 1, 1); | ||
| 344 | new[0] = '$'; | ||
| 345 | memcpy(new + 1, param, strlen(param)); | ||
| 346 | df->param = parse_var(new); | ||
| 347 | free(new); | ||
| 348 | } else { | ||
| 349 | df->param = parse_var(param); | ||
| 350 | } | ||
| 340 | if (!df->param) { | 351 | if (!df->param) { |
| 341 | sp_log_err("config", "Invalid value '%s' for `param` on line %zu.", param, | 352 | sp_log_err("config", "Invalid value '%s' for `param` on line %zu.", param, |
| 342 | sp_line_no); | 353 | sp_line_no); |
