diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-11 08:59:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-11 08:59:44 -0700 |
| commit | 7f7bd206dc8309ca767b47fb97bb9e7c2dc882c3 (patch) | |
| tree | 2d24acb80954ec2d33863befa9ce48ecd3075e72 /lib/std/net.zig | |
| parent | 5512455974a9dda5d2a86a81e4a5cc520cb7afa8 (diff) | |
| parent | 4d296debefccbd80f2007685a27386b7434464dd (diff) | |
| download | zig-7f7bd206dc8309ca767b47fb97bb9e7c2dc882c3.tar.gz zig-7f7bd206dc8309ca767b47fb97bb9e7c2dc882c3.zip | |
Merge pull request #15519 from dweiller/issue-15482
Optimize lowering of `s[start..][0..len]`
Diffstat (limited to 'lib/std/net.zig')
| -rw-r--r-- | lib/std/net.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/net.zig b/lib/std/net.zig index 15a9e01da8..57e50a7349 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -1701,7 +1701,7 @@ fn dnsParse( p += @as(usize, 1) + @boolToInt(p[0] != 0); const len = p[8] * @as(usize, 256) + p[9]; if (@ptrToInt(p) + len > @ptrToInt(r.ptr) + r.len) return error.InvalidDnsPacket; - try callback(ctx, p[1], p[10 .. 10 + len], r); + try callback(ctx, p[1], p[10..][0..len], r); p += 10 + len; } } |
