summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-06-24 20:34:42 +0200
committerAraq <rumpf_a@web.de>2015-06-25 02:08:57 +0200
commit2a1620490c43694bfdd433f0c940490d65b24a53 (patch)
treebbdf449cf114d2c9cb43261cec4821b392f50fef /compiler
parenteef0e1bde1baebca9384f13a52e7fc8fca9a32fc (diff)
downloadNim-2a1620490c43694bfdd433f0c940490d65b24a53.tar.gz
protect against new stupid setlen that doesn't accept -1 anymore
Diffstat (limited to 'compiler')
-rw-r--r--compiler/vmdeps.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/vmdeps.nim b/compiler/vmdeps.nim
index 21ee4967b..88bb7ae24 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 =