From afae851319c543118f08b49b1fa804ef31e34267 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 20 Aug 2018 17:28:42 -0400 Subject: Set errno in vaswprintf in case vswprintf does not As is the case on GNU. --- pls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pls.c b/pls.c index 01df654..d768b8f 100644 --- a/pls.c +++ b/pls.c @@ -75,6 +75,7 @@ int vaswprintf(wchar_t **ret, const wchar_t *format, va_list ap) { va_list _ap; va_copy(_ap, ap); + errno = EOVERFLOW; // vswprintf may not set errno. int len = vswprintf(*ret, 1 + cap, format, _ap); va_end(_ap); -- cgit 1.4.1-2-gfad0