mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix array copy; ci: test prebuilt Windows package
This commit is contained in:
@ -368,7 +368,7 @@ pub fn (b []byte) hex() string {
|
||||
pub fn copy(dst, src []byte) int {
|
||||
if dst.len > 0 && src.len > 0 {
|
||||
min := if dst.len < src.len { dst.len } else { src.len }
|
||||
C.memcpy(dst.data, src[min..].data, dst.element_size * min)
|
||||
C.memcpy(dst.data, src[..min].data, dst.element_size * min)
|
||||
return min
|
||||
}
|
||||
return 0
|
||||
|
Reference in New Issue
Block a user