diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-07-13 15:59:46 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-07-13 16:10:41 -0700 |
| commit | fad95741db7529bbad873fb330c25d64ac765340 (patch) | |
| tree | 22ca663d66d22bccc6ffe9ac0d2c676ed8bb0636 /lib/std/os.zig | |
| parent | 1fee9eac8bb5d2e3e78c098b9cebe2cda332e7cf (diff) | |
| download | zig-fad95741db7529bbad873fb330c25d64ac765340.tar.gz zig-fad95741db7529bbad873fb330c25d64ac765340.zip | |
AstGen: fix loop control flow applying to wrong loop
In the case of 'continue' or 'break' inside the 'else' block of a
'while' or 'for' loop.
Closes #12109
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index 02ed710dd3..f4653920ae 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -6476,7 +6476,7 @@ pub fn dn_expand( p = msg.ptr + j; } else if (p[0] != 0) { if (dest != exp_dn.ptr) { - dest.* = '.'; + dest[0] = '.'; dest += 1; } var j = p[0]; @@ -6486,12 +6486,12 @@ pub fn dn_expand( } while (j != 0) { j -= 1; - dest.* = p[0]; + dest[0] = p[0]; dest += 1; p += 1; } } else { - dest.* = 0; + dest[0] = 0; if (len == std.math.maxInt(usize)) len = @ptrToInt(p) + 1 - @ptrToInt(comp_dn.ptr); return len; } |
