[fpc-devel] patch for inifiles unit bug 4692

Peter Vreman peter at freepascal.org
Mon Mar 6 12:25:58 CET 2006


> Hi!
>
> I fixed bug  4692
>
> THe problem is in inifiles.pas
> Change the following procedure for:
> procedure TIniFile.DeleteKey(const Section, Ident: String);
> var
>  oSection: TIniFileSection;
>  oKey: TIniFileKey;
> begin
>  oSection := FSectionList.SectionByName(Section);
>  if oSection <> nil then begin
>    oKey := oSection.KeyList.KeyByName(Ident);
>    if oKey <> nil then begin
>      oSection.KeyList.Delete(oSection.KeyList.IndexOf(oKey)); //this is
> the change
>      oKey.Free;
>      UpdateFile;
>    end;
>  end;
> end;

Thanks, Applied.






More information about the fpc-devel mailing list