X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5737d05f8665dfd3f62dd8e536b317f1f48202c5..7f1698c34c3d4241bb96a6a40d02bd25df6db594:/src/common/string.cpp?ds=inline diff --git a/src/common/string.cpp b/src/common/string.cpp index 4a1c6d95a9..d8a1d812b2 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1097,6 +1097,7 @@ int wxString::Find(const wxChar *pszSub) const bool wxString::ToLong(long *val, int base) const { wxCHECK_MSG( val, FALSE, _T("NULL pointer in wxString::ToLong") ); + wxASSERT_MSG( !base || (base > 1 && base <= 36), _T("invalid base") ); const wxChar *start = c_str(); wxChar *end; @@ -1110,6 +1111,7 @@ bool wxString::ToLong(long *val, int base) const bool wxString::ToULong(unsigned long *val, int base) const { wxCHECK_MSG( val, FALSE, _T("NULL pointer in wxString::ToULong") ); + wxASSERT_MSG( !base || (base > 1 && base <= 36), _T("invalid base") ); const wxChar *start = c_str(); wxChar *end;