mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 04:04:44 +01:00
Sema: validate deref operator type and value
This commit is contained in:
parent
3c73f71177
commit
ae7b32eb62
20 changed files with 91 additions and 43 deletions
|
|
@ -82,7 +82,7 @@ fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 {
|
|||
var d = dest.?;
|
||||
var n = len;
|
||||
while (true) {
|
||||
d.* = c;
|
||||
d[0] = c;
|
||||
n -= 1;
|
||||
if (n == 0) break;
|
||||
d += 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue