diff --git a/src/common/string.cpp b/src/common/string.cpp index 20608e466b..f222417109 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1710,6 +1710,8 @@ bool wxString::ToDouble(double *val) const { wxCHECK_MSG( val, false, _T("NULL pointer in wxString::ToDouble") ); + errno = 0; + const wxChar *start = c_str(); wxChar *end; *val = wxStrtod(start, &end);