diff options
Diffstat (limited to 'interpolate.c')
-rw-r--r-- | interpolate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/interpolate.c b/interpolate.c index 00826778fc..2f727cd05b 100644 --- a/interpolate.c +++ b/interpolate.c @@ -76,8 +76,12 @@ unsigned long interpolate(char *result, unsigned long reslen, /* Check for valid interpolation. */ if (i < ninterps) { value = interps[i].value; - valuelen = strlen(value); + if (!value) { + src += namelen; + continue; + } + valuelen = strlen(value); if (newlen + valuelen + 1 < reslen) { /* Substitute. */ strncpy(dest, value, valuelen); |