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

os: fix file.writeln(s) too, where s contains 0 bytes

This commit is contained in:
Delyan Angelov 2020-07-04 14:10:22 +03:00
parent 3b067f5f85
commit bae9ed0350

View File

@ -56,7 +56,7 @@ pub fn (mut f File) writeln(s string) {
}
*/
// TODO perf
C.fputs(s.str, f.cfile)
C.fwrite(s.str, s.len, 1, f.cfile)
C.fputs('\n', f.cfile)
}