From 2a1620490c43694bfdd433f0c940490d65b24a53 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 24 Jun 2015 20:34:42 +0200 Subject: [PATCH] protect against new stupid setlen that doesn't accept -1 anymore --- compiler/vmdeps.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/vmdeps.nim b/compiler/vmdeps.nim index 21ee4967b1..88bb7ae24f 100644 --- a/compiler/vmdeps.nim +++ b/compiler/vmdeps.nim @@ -15,7 +15,8 @@ proc readOutput(p: Process): string = while not output.atEnd: result.add(output.readLine) result.add("\n") - result.setLen(result.len - "\n".len) + if result.len > 0: + result.setLen(result.len - "\n".len) discard p.waitForExit proc opGorge*(cmd, input: string): string =