Subject: Bug 3605401: Compiler error with latest mingw-w64 headers

From: "jan.nijtmans" <[email-masked]>
Date: Wed, 20 Feb 2013 10:25:59 +0000

---
 win/tclWinDde.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index d0600e6..94b4e4c 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -385,7 +385,8 @@ DdeSetServerName(
 		    Tcl_DStringSetLength(&dString, offset + sizeof(TCHAR) * TCL_INTEGER_SPACE);
 		    actualName = (TCHAR *) Tcl_DStringValue(&dString);
 		}
-		_stprintf((TCHAR *) (Tcl_DStringValue(&dString) + offset), TEXT("%d"), suffix);
+		_sntprintf((TCHAR *) (Tcl_DStringValue(&dString) + offset),
+			TCL_INTEGER_SPACE, TEXT("%d"), suffix);
 	    }
 
 	    /*
-- 
cgit v0.12