Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Bug in TStrList.IndexOfName [Delphi]


Dodfr ©   (2005-10-27 11:17:00) 

Hi,

I already sent 3 mails to Vlad about this bug but each update seems not fix it :

You must replace  :

if StrLComp( PChar( LowerCase( ItemPtrs[ i ] ) ), PChar( AName ), L ) = 0 then

With :

if StrLComp( PChar( LowerCase( ItemPtrs[ i ] + fNameDelim) ), PChar( AName ), L ) = 0 then

Or the IndexOfname will always fail.

Also the remark :

     // For optimization, check only list entry that begin with same letter as searched name

Can be removed as the small optimize part seems to have dissapear from source.

In fact, it seems the IndexOfName original code has been retouched by someone else comparing by original I sent to Vlad 8 July 2002 that did not had the bug.


SPeller   (2005-10-28 04:53:00) [1]

O, I am sorry - I mean other function, but I never had problems with this function.


Dodfr   (2005-10-27 16:55:00) [2]

I noticed the problem when recompiling an old program that used this function and did not work anymore without the fix.


SPeller   (2005-10-27 12:53:00) [3]

Hm, I had not problems with this function. But I use it many months ago. Maybe some changes was applied?


Наверх

Титульная страница Поиск, карта сайта Написать письмо