diff --git a/include/wx/wxcrt.h b/include/wx/wxcrt.h index e8bdc628c2..9f17dc759b 100644 --- a/include/wx/wxcrt.h +++ b/include/wx/wxcrt.h @@ -858,7 +858,8 @@ template<> struct wxStrtoxCharType template inline double wxStrtod(const wxString& nptr, T endptr) { - if (endptr) + // Explicit comparison with 0 required when using T=nullptr with MSVS 2012. + if (endptr != 0) { // note that it is important to use c_str() here and not mb_str() or // wc_str(), because we store the pointer into (possibly converted)