Skip to content

Commit

Permalink
fix memcpy typo
Browse files Browse the repository at this point in the history
  • Loading branch information
truemedian authored and RossComputerGuy committed Apr 19, 2024
1 parent d096792 commit b3a24d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/os/uefi/posix.zig
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ pub fn getcwd(out_buffer: []u8) std.posix.GetCwdError![]u8 {
if (path.len > out_buffer.len)
return error.NameTooLong;

@memcpy(out_buffer[0..path.len], out_buffer);
@memcpy(out_buffer[0..path.len], path);
return out_buffer[0..path.len];
}

Expand Down Expand Up @@ -516,7 +516,7 @@ pub fn readlinkat(dirfd: fd_t, file_path: []const u8, out_buffer: []u8) std.posi
if (path.len > out_buffer.len)
return error.NameTooLong;

@memcpy(out_buffer[0..path.len], out_buffer);
@memcpy(out_buffer[0..path.len], path);
return path;
}

Expand Down

0 comments on commit b3a24d5

Please sign in to comment.