LazUtils, a small fix in TDictionaryStringList.InsertItem

git-svn-id: trunk@40538 -
This commit is contained in:
juha 2013-03-12 15:41:54 +00:00
parent aeba11b9c8
commit 58b6eb6943

View File

@ -111,7 +111,7 @@ procedure TDictionaryStringList.InsertItem(Index: Integer; const S: string);
begin
// if FAssigning then Exit;
if (Duplicates <> dupAccept) and not Sorted then
if IndexOf(S) <> -1 then
if FMap.Contains(S) then
case Duplicates of
DupIgnore : Exit;
DupError : raise Exception.Create('TDictionaryStringList.InsertItem:'