summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-07-27 01:28:13 +0200
committerAraq <rumpf_a@web.de>2013-07-27 01:28:13 +0200
commitfca23d1675c8dd7487266a2478a4e7ee66807acc (patch)
tree5839e3e049cf6ae2c28a41981da5b6ac84c01cca /lib
parent698eac2a94f9b2ef687735cf3e49d93e7cdb2121 (diff)
downloadNim-fca23d1675c8dd7487266a2478a4e7ee66807acc.tar.gz
bugfix: system.& for sequences
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 6750a2d22..9c25f2923 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1454,9 +1454,9 @@ proc `&` *[T](x: seq[T], y: T): seq[T] {.noSideEffect.} =
 
 proc `&` *[T](x: T, y: seq[T]): seq[T] {.noSideEffect.} =
   newSeq(result, y.len + 1)
+  result[0] = x
   for i in 0..y.len-1:
-    result[i] = y[i]
-  result[y.len] = x
+    result[i+1] = y[i]
 
 when not defined(NimrodVM):
   when not defined(JS):