From 1324b0ca9f8a7fdaf03b374c75eb3c9df407c2f1 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Fri, 10 Dec 2010 00:08:24 +0000 Subject: [PATCH] Typo in xserver Xvasprintf() I needed this patch in the wrapper around vsnprintf() in os/xprintf.c (MinGW for Windows build) to correct various crashes. Reviewed-by: Alan Coopersmith --- os/xprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/xprintf.c b/os/xprintf.c index 0a8bd0687..254b7374a 100644 --- a/os/xprintf.c +++ b/os/xprintf.c @@ -108,7 +108,7 @@ Xvasprintf(char **ret, const char * _X_RESTRICT_KYWD format, va_list va) return -1; vsnprintf(*ret, size + 1, format, va); - ret[size] = 0; + (*ret)[size] = 0; return size; #endif }