tag/Handler: improve snprintf() return value check

This commit is contained in:
Max Kellermann 2017-02-19 19:34:13 +01:00
parent 4bb83781e8
commit f3b788703e
1 changed files with 1 additions and 1 deletions

View File

@ -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