From 9257d0b705e4d331dfea6481cf577dbb350cd597 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 25 Dec 1998 00:34:23 +0000 Subject: [PATCH] wxStringList::Sort() bug corrected git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/list.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/list.cpp b/src/common/list.cpp index b11a21e816..a98385159d 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -628,11 +628,11 @@ void wxStringList::Sort() } qsort (array, N, sizeof (char *), wx_comparestrings); - Clear(); - for (i = 0; i < N; i++) - Append (array[i]); + i = 0; + for ( node = GetFirst(); node; node = node->GetNext() ) + node->SetData( array[i++] ); - delete[]array; + delete [] array; }