diff --git a/src/i_tcp.c b/src/i_tcp.c
index c054b3a4a1e0502a1e3eee7622275df47f8305bf..43dba4aa30f5b5c5e4e20bde93f67a06b51964f1 100644
--- a/src/i_tcp.c
+++ b/src/i_tcp.c
@@ -266,7 +266,7 @@ static void wattcp_outch(char s)
 // stupid microsoft makes things complicated
 static inline char *get_WSAErrorStr(int e)
 {
-	char buf[256]; // allow up to 255 bytes
+	static char buf[256]; // allow up to 255 bytes
 
 	buf[0] = '\0';