summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--misc/bstr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/bstr.h b/misc/bstr.h
index a1e99dd4a5..6871da1c18 100644
--- a/misc/bstr.h
+++ b/misc/bstr.h
@@ -207,7 +207,7 @@ static inline int bstr_eatstart0(struct bstr *s, const char *prefix)
}
// create a pair (not single value!) for "%.*s" printf syntax
-#define BSTR_P(bstr) (int)((bstr).len), (bstr).start
+#define BSTR_P(bstr) (int)((bstr).len), ((bstr).start ? (char*)(bstr).start : "")
#define WHITESPACE " \f\n\r\t\v"