]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix the return value of wxSimpleHtmlListBox::Insert().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Nov 2010 11:34:40 +0000 (11:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Nov 2010 11:34:40 +0000 (11:34 +0000)
The returned index was off by 1.

Closes #12717.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/htmllbox.cpp

index 0e89d1e8f1c00c0f731c8c9bd1e008761787a2c2..2bc89731c198f1c2490d7b63103926b668bba95a 100644 (file)
@@ -686,7 +686,7 @@ int wxSimpleHtmlListBox::DoInsertItems(const wxArrayStringsAdapter& items,
 
     UpdateCount();
 
-    return pos;
+    return pos - 1;
 }
 
 void wxSimpleHtmlListBox::SetString(unsigned int n, const wxString& s)