mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-19 19:25:41 +02:00
tag: tag_new_string(): allow NULL values (treat as empty string)
This commit is contained in:
parent
7f2c0681a7
commit
3bc4bd56a9
1 changed files with 1 additions and 1 deletions
2
tag.c
2
tag.c
|
@ -262,7 +262,7 @@ tag_new_string(const char *name, const char *value)
|
|||
{
|
||||
struct private *priv = malloc(sizeof(*priv));
|
||||
priv->name = strdup(name);
|
||||
priv->value_as_string = strdup(value);
|
||||
priv->value_as_string = value != NULL ? strdup(value) : strdup("");
|
||||
|
||||
struct tag *tag = malloc(sizeof(*tag));
|
||||
tag->private = priv;
|
||||
|
|
Loading…
Add table
Reference in a new issue