From 3d57d3bb7bbbebc71da7f061c756127db2da260d Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 17 Jan 2020 19:44:03 +0100 Subject: [PATCH] cc.v: fix C error message part 2 --- vlib/compiler/cc.v | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vlib/compiler/cc.v b/vlib/compiler/cc.v index d210e6277c..4ff3fb9ef5 100644 --- a/vlib/compiler/cc.v +++ b/vlib/compiler/cc.v @@ -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') } }