mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-19 19:25:41 +02:00
tag: tags_expand_template(): return NULL if template is NULL
This commit is contained in:
parent
85801a5deb
commit
32b4e9986d
1 changed files with 3 additions and 1 deletions
4
tag.c
4
tag.c
|
@ -399,8 +399,10 @@ sbuf_strcat(struct sbuf *s1, const char *s2)
|
|||
char *
|
||||
tags_expand_template(const char *template, const struct tag_set *tags)
|
||||
{
|
||||
struct sbuf formatted = {0};
|
||||
if (template == NULL)
|
||||
return NULL;
|
||||
|
||||
struct sbuf formatted = {0};
|
||||
while (true) {
|
||||
/* Find next tag opening '{' */
|
||||
const char *begin = strchr(template, '{');
|
||||
|
|
Loading…
Add table
Reference in a new issue