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

cc.v: fix C error message part 2

This commit is contained in:
Alexander Medvednikov 2020-01-17 19:44:03 +01:00
parent 2cd24ea722
commit 3d57d3bb7b

View File

@ -340,14 +340,13 @@ start:
}
else {
if res.output.len < 30 {
println(res.output.len)
println(res.output)
} else {
max := 50
n := if res.output.len > 50 { 50 } else { res.output.len }
n := if res.output.len > max { max } else { res.output.len }
partial_output := res.output[res.output.len-n..].trim_right('\r\n')
print(partial_output)
if n < 50 {
if n < max {
println('...\n(Use `v -cg` to print the entire error message)\n')
}
}