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:
parent
e3275f6083
commit
e70ef5334a
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -162,8 +162,14 @@ jobs:
|
|||||||
windows-prebuilt:
|
windows-prebuilt:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
|
shell: bash
|
||||||
- name: Download V
|
- name: Download V
|
||||||
run: echo "test" #wget https://github.com/vbinaries/vbinaries/releases/download/latest/v_windows.zip && unzip v_windows.zip && ./v.exe --version
|
run: |
|
||||||
|
echo "Downloading v.exe..."
|
||||||
|
wget https://github.com/vbinaries/vbinaries/releases/download/latest/v_windows.zip
|
||||||
|
unzip v_windows.zip
|
||||||
|
./v.exe --version
|
||||||
|
echo "Done"
|
||||||
- name: Test V
|
- name: Test V
|
||||||
run: echo "test" #./v.exe examples/hello_world.v && examples/hello_world.exe
|
run: echo "test" #./v.exe examples/hello_world.v && examples/hello_world.exe
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ pub fn (b []byte) hex() string {
|
|||||||
pub fn copy(dst, src []byte) int {
|
pub fn copy(dst, src []byte) int {
|
||||||
if dst.len > 0 && src.len > 0 {
|
if dst.len > 0 && src.len > 0 {
|
||||||
min := if dst.len < src.len { dst.len } else { src.len }
|
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 min
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user