]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/string.h
For non-Unicode added #include <ctype.h> and <string.h> to avoid some missing
[wxWidgets.git] / include / wx / string.h
index 97e65cc9415dabf6a21c95beeece6d4445e81760..ade4672b4d2fa66267f9ccf5e9303de65352ae23 100644 (file)
@@ -66,7 +66,7 @@ const unsigned int wxSTRING_MAXLEN = UINT_MAX - 100;
 #define   WXSTRINGCAST (char *)(const char *)
 
 // implementation only
-#define   ASSERT_VALID_INDEX(i) wxASSERT( (unsigned)(i) < Len() )
+#define   ASSERT_VALID_INDEX(i) wxASSERT( (unsigned)(i) <= Len() )
 
 // ---------------------------------------------------------------------------
 // Global functions complementing standard C string library replacements for
@@ -323,7 +323,7 @@ public:
     // under Unix it is tested with configure, assume it works on other
     // platforms (there might be overloading problems if size_t and int are
     // the same type)
-#if !defined(__UNIX__) || defined(wxUSE_SIZE_T_STRING_OPERATOR)
+#if !defined(__UNIX__) || wxUSE_SIZE_T_STRING_OPERATOR
     // operator version of GetChar
     char  operator[](size_t n) const
       { ASSERT_VALID_INDEX( n ); return m_pchData[n]; }