Commit f3b78870 authored by Max Kellermann's avatar Max Kellermann

tag/Handler: improve snprintf() return value check

parent 4bb83781
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment