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);
|
||||
if (value != end) {
|
||||
char s[21];
|
||||
if (snprintf(s, 21, "%u", n) >= 0)
|
||||
if (snprintf(s, 21, "%u", n) > 0)
|
||||
tag.AddItem(type, s);
|
||||
}
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue