Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-03

patch for inifiles unit bug 4692

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

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

Reply by email

Peter Vreman
to Unknown author
Show quoted text 22 lines
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.

Reply by email