summary refs log tree commit diff stats
path: root/compiler/pathutils.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-10 23:27:45 +0200
committerAraq <rumpf_a@web.de>2018-09-10 23:27:45 +0200
commitf14f5544354b9731417e5eeea0a42bbfd42739fb (patch)
treeca942f21e1057e38f4dc5e0205b3bd160eaf4a4e /compiler/pathutils.nim
parent2d8adb8e03c4663a5f7148980e636abf187780ef (diff)
downloadNim-f14f5544354b9731417e5eeea0a42bbfd42739fb.tar.gz
nim doc: fixes cross-link generation when --out is used
Diffstat (limited to 'compiler/pathutils.nim')
-rw-r--r--compiler/pathutils.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/pathutils.nim b/compiler/pathutils.nim
index b71caf314..ef0fa4abd 100644
--- a/compiler/pathutils.nim
+++ b/compiler/pathutils.nim
@@ -111,7 +111,7 @@ proc canon(x: string; result: var string; state: var int) =
       # f/..
       while d > (state and 1) and result[d-1] != DirSep:
         dec d
-      setLen(result, d-1)
+      if d > 0: setLen(result, d-1)
     elif isDot(x, b):
       discard "discard the dot"
     elif b[1] > b[0]: