Skip to content

Commit 4a05a4d

Browse files
authored
Merge pull request #229 from TazE-scripts/master
TConfigINI.Get default value if not found
2 parents a610931 + 2fbe3f3 commit 4a05a4d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

utils/config.simba

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,13 @@ begin
500500
Result := ReadINI(Section, KeyName, Self.Path);
501501
end;
502502

503+
function TConfigINI.Get(Section, KeyName: String; DefaultValue: String = ''): String; overload;
504+
begin
505+
Result := ReadINI(Section, KeyName, Self.Path);
506+
if Result = '' then
507+
Result := DefaultValue;
508+
end;
509+
503510
(*
504511
## TConfigINI.GetKeys
505512
```pascal

0 commit comments

Comments
 (0)