From 12a7fb5f0bfa6a6c9b5634eca3144490d6403aca Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 5 Nov 2011 15:20:32 +0000 Subject: [PATCH] Fix wxArray::Index() with bFromEnd=true in STL build. This function incorrectly returned index from the end of the array when searching from the end. Fixed to work as the non-STL version. Fixes #13626. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dynarray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 56abaae013..d50c7c19e8 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -151,7 +151,7 @@ public: \ e = rend(); \ for ( const_reverse_iterator i = b; i != e; ++i ) \ if ( *i == item ) \ - return (int)(i - b); \ + return (int)(e - i - 1); \ } \ else \ { \ -- 2.45.2