diff options
author | Araq <rumpf_a@web.de> | 2015-06-24 20:34:42 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-06-25 02:08:57 +0200 |
commit | 2a1620490c43694bfdd433f0c940490d65b24a53 (patch) | |
tree | bbdf449cf114d2c9cb43261cec4821b392f50fef /compiler | |
parent | eef0e1bde1baebca9384f13a52e7fc8fca9a32fc (diff) | |
download | Nim-2a1620490c43694bfdd433f0c940490d65b24a53.tar.gz |
protect against new stupid setlen that doesn't accept -1 anymore
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/vmdeps.nim | 3 |
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 = |