Application Context Implementation #4

Closed
kayomn wants to merge 93 commits from event-loop-dev into main
1 changed files with 2 additions and 0 deletions
Showing only changes of commit dd81ae76ec - Show all commits

View File

@ -378,12 +378,14 @@ pub const Path = extern struct {
while (components.next()) |component| if (component.len != 0) { while (components.next()) |component| if (component.len != 0) {
for (component) |byte| { for (component) |byte| {
if (path.length == max) return error.TooLong; if (path.length == max) return error.TooLong;
path.buffer[path.length] = byte; path.buffer[path.length] = byte;
path.length += 1; path.length += 1;
} }
if (components.hasNext()) { if (components.hasNext()) {
if (path.length == max) return error.TooLong; if (path.length == max) return error.TooLong;
path.buffer[path.length] = '/'; path.buffer[path.length] = '/';
path.length += 1; path.length += 1;
} }