about summary refs log tree commit diff
path: root/pls.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pls.c1
1 files changed, 1 insertions, 0 deletions
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);