diff options
-rw-r--r-- | src/http/url_path.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/http/url_path.zig b/src/http/url_path.zig index d5f9ddbc1..24bcea76b 100644 --- a/src/http/url_path.zig +++ b/src/http/url_path.zig @@ -59,11 +59,12 @@ pub fn parse(possibly_encoded_pathname_: string) !URLPath { var needs_redirect = false; if (strings.containsChar(decoded_pathname, '%')) { - var possibly_encoded_pathname = switch (decoded_pathname.len) { + // https://github.com/ziglang/zig/issues/14148 + var possibly_encoded_pathname: []u8 = switch (decoded_pathname.len) { 0...1024 => &temp_path_buf, else => &big_temp_path_buf, }; - possibly_encoded_pathname = possibly_encoded_pathname[0..std.math.min( + possibly_encoded_pathname = possibly_encoded_pathname[0..@min( possibly_encoded_pathname_.len, possibly_encoded_pathname.len, )]; |