From 8005c5961543796c20bd9b940afcdaa4c8423adf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 17 Nov 2019 18:26:26 +0100 Subject: [PATCH] Stop truncating all wxString::Printf() arguments to 65535 chars There is absolutely no good reason to do it and it resulted in silently truncating all the string formatted using "%s" to their first 65535 characters when using our wxPrintf() implementation. Closes #18586. --- include/wx/private/wxprintf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/wx/private/wxprintf.h b/include/wx/private/wxprintf.h index 5854d894d7..40ba87eef0 100644 --- a/include/wx/private/wxprintf.h +++ b/include/wx/private/wxprintf.h @@ -19,6 +19,7 @@ #include "wx/log.h" #include "wx/utils.h" +#include #include // prefer snprintf over sprintf @@ -189,7 +190,7 @@ template void wxPrintfConvSpec::Init() { m_nMinWidth = 0; - m_nMaxWidth = 0xFFFF; + m_nMaxWidth = INT_MAX; m_pos = 0; m_bAlignLeft = false; m_pArgPos = m_pArgEnd = NULL;