Skip to content

Commit

Permalink
Update config.ct
Browse files Browse the repository at this point in the history
  • Loading branch information
apache-hb committed Oct 30, 2024
1 parent 449609b commit 8a73f76
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data/examples/config/config.ct
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ def readUntil(current: *char, terminator: char): StringView {
current = &current[1];
}

var back = current;
current = &current[1];

return .{
front = front,
back = current
back = back
};
}

Expand Down Expand Up @@ -119,7 +122,7 @@ export def openConfigFile(path: str): ConfigFile {

if letter == '[' {
const name = readUntil(file.fileView + index, ']');
index = index + stringViewLength(name) + 1;
index = index + stringViewLength(name);

sections[file.sectionCount] = .{
name = name,
Expand Down

0 comments on commit 8a73f76

Please sign in to comment.