[fpc-devel] patch for inifiles unit bug 4692

anteusz at freemail.hu anteusz at freemail.hu
Mon Mar 6 12:09:54 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;

Regards

Márton Papp



More information about the fpc-devel mailing list