tag/Handler: improve snprintf() return value check
This commit is contained in:
parent
4bb83781e8
commit
f3b788703e
@ -44,7 +44,7 @@ add_tag_tag(TagType type, const char *value, void *ctx)
|
|||||||
unsigned n = strtoul(value, &end, 10);
|
unsigned n = strtoul(value, &end, 10);
|
||||||
if (value != end) {
|
if (value != end) {
|
||||||
char s[21];
|
char s[21];
|
||||||
if (snprintf(s, 21, "%u", n) >= 0)
|
if (snprintf(s, 21, "%u", n) > 0)
|
||||||
tag.AddItem(type, s);
|
tag.AddItem(type, s);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user