diff options
author | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-06-19 06:12:15 +0000 |
---|---|---|
committer | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-06-19 06:12:15 +0000 |
commit | 776e508e7dc00a256371a0412319df33367f630c (patch) | |
tree | b7631b23e58dc4088b2dad9f30a27dd78f7354bb | |
parent | 45ae8e8d70253c09fcaec8478ed8de58c2a8b734 (diff) | |
download | fpc-776e508e7dc00a256371a0412319df33367f630c.tar.gz |
* Fix bug ID 35731 (ReadSectionRaw needs to read comments)
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42247 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | packages/fcl-base/examples/testini.pp | 9 | ||||
-rw-r--r-- | packages/fcl-base/src/inifiles.pp | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/packages/fcl-base/examples/testini.pp b/packages/fcl-base/examples/testini.pp index e3c8268013..b58e4d4979 100644 --- a/packages/fcl-base/examples/testini.pp +++ b/packages/fcl-base/examples/testini.pp @@ -33,8 +33,13 @@ begin for i:=0 to lines.Count-1 do WriteLn(' ', lines[i]); lines.Clear(); - ini.ReadSectionValues('main', lines,[svoIncludeComments]); - WriteLn('ReadSectionValues (with comments, no invalid):'); + ini.ReadSectionValues('main', lines,[]); + WriteLn('ReadSectionValues (no options):'); + for i:=0 to lines.Count-1 do + WriteLn(' ', lines[i]); + lines.Clear(); + ini.ReadSectionRaw('main', lines); + WriteLn('ReadSectionRaw (with comments, no invalid):'); for i:=0 to lines.Count-1 do WriteLn(' ', lines[i]); lines.Clear(); diff --git a/packages/fcl-base/src/inifiles.pp b/packages/fcl-base/src/inifiles.pp index 7fe47c4531..72367e5378 100644 --- a/packages/fcl-base/src/inifiles.pp +++ b/packages/fcl-base/src/inifiles.pp @@ -1190,7 +1190,6 @@ begin oSection := FSectionList.SectionByName(Section,CaseSensitive); if oSection <> nil then with oSection.KeyList do for i := 0 to Count-1 do - if not IsComment(Items[i].Ident) then begin if Items[i].Ident<>'' then Strings.Add(Items[i].Ident + Separator +Items[i].Value) |