summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asprintf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/asprintf.h b/asprintf.h
index acec2b1..10c1dd7 100644
--- a/asprintf.h
+++ b/asprintf.h
@@ -11,7 +11,7 @@ static inline int vasprintf(char **strp, const char *fmt, va_list ap)
va_copy(cp, ap);
int len = vsnprintf(NULL, 0, fmt, ap) + 1;
- if (len < 0) {
+ if (len <= 0) {
return -1;
}