]> git.saurik.com Git - wxWidgets.git/commitdiff
allow access to terminating NUL character with operator[]
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 7 Apr 1999 17:22:19 +0000 (17:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 7 Apr 1999 17:22:19 +0000 (17:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index 50f9fbf4a10deab8f4e0b1b7edbd074050b208eb..ade4672b4d2fa66267f9ccf5e9303de65352ae23 100644 (file)
@@ -66,7 +66,7 @@ const unsigned int wxSTRING_MAXLEN = UINT_MAX - 100;
 #define   WXSTRINGCAST (char *)(const char *)
 
 // implementation only
 #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
 
 // ---------------------------------------------------------------------------
 // Global functions complementing standard C string library replacements for