diff --git a/src/tag/TagHandler.cxx b/src/tag/TagHandler.cxx
index 46e3e79b4..345c64a21 100644
--- a/src/tag/TagHandler.cxx
+++ b/src/tag/TagHandler.cxx
@@ -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