From 2c47c53728cbc879fa45ae1ac2998b67ea1fedd0 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Mon, 28 Feb 2005 02:47:51 +0000 Subject: [PATCH] fix for bug raised in patch [ 1145715 ] endless loop in wxString::PrintV git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/string.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/string.cpp b/src/common/string.cpp index aa150ea..672b5b1 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #ifdef __SALFORDC__ #include @@ -1835,7 +1836,9 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr) // vsnprintf() may return either -1 (traditional Unix behaviour) or the // total number of characters which would have been written if the // buffer were large enough - if ( len >= 0 && len <= size ) + // also, it may return an errno may be something like EILSEQ, + // in which case we need to break out + if ( (len >= 0 && len <= size) || errno != EOVERFLOW ) { // ok, there was enough space break; -- 2.7.4