diff --git a/core/net/url.odin b/core/net/url.odin index a5e529928..460bb70ad 100644 --- a/core/net/url.odin +++ b/core/net/url.odin @@ -36,9 +36,11 @@ split_url :: proc(url: string, allocator := context.allocator) -> (scheme, host, s = s[:i] if query_str != "" { queries_parts := strings.split(query_str, "&") + defer delete(queries_parts) queries = make(map[string]string, len(queries_parts), allocator) for q in queries_parts { parts := strings.split(q, "=") + defer delete(parts) switch len(parts) { case 1: queries[parts[0]] = "" // NOTE(tetra): Query not set to anything, was but present. case 2: queries[parts[0]] = parts[1] // NOTE(tetra): Query set to something.