1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: fix early termination when saving binary (#5646)

This commit is contained in:
div72 2020-07-04 02:48:01 +03:00 committed by GitHub
parent 37f31da6c9
commit 95696559b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,9 @@ module http
import os
pub fn download_file(url, out string) bool {
$if debug_http? {
println('download file url=$url out=$out')
}
s := get(url) or {
return false
}

View File

@ -39,7 +39,7 @@ pub fn (mut f File) write(s string) {
}
}
*/
C.fputs(s.str, f.cfile)
C.fwrite(s.str, s.len, 1, f.cfile)
}
pub fn (mut f File) writeln(s string) {