checker: disallow implicit conversion from fixed array to fooptr (#8823)

This commit is contained in:
Nick Treleaven 2021-02-25 23:28:47 +00:00 committed by GitHub
parent 639061be6c
commit c03798e390
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 18 deletions

View file

@ -276,7 +276,7 @@ pub fn exec(cmd string) ?Result {
mut result := false
unsafe {
result = C.ReadFile(child_stdout_read, buf, 1000, voidptr(&bytes_read), 0)
read_data.write_bytes(buf, int(bytes_read))
read_data.write_bytes(&buf[0], int(bytes_read))
}
if result == false || int(bytes_read) == 0 {
break