bin2v: correct newlines in console output (#7925)

pull/7928/head
Lukas Neubert 2021-01-06 18:19:48 +01:00 committed by GitHub
parent 8a0fc2e3c2
commit 5683af821e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,7 @@ fn main() {
exit(0)
}
context.files = real_files
if context.write_file != '' && !context.write_file.ends_with('.v') {
if context.write_file != '' && os.file_ext(context.write_file) !in ['.vv', '.v'] {
context.write_file += '.v'
}
mut file_byte_map := map[string][]byte{}
@ -140,10 +140,10 @@ fn main() {
}
out_file.write_str(context.footer())
} else {
println(context.header())
print(context.header())
for bname, fbytes in file_byte_map {
println(context.file2v(bname, fbytes, max_bname))
print(context.file2v(bname, fbytes, max_bname))
}
println(context.footer())
print(context.footer())
}
}