summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-06-10 02:22:16 +0200
committerAraq <rumpf_a@web.de>2011-06-10 02:22:16 +0200
commit5f2d930a54c5b51e29b133f5e9753a8101092553 (patch)
treeec83e4eb21117a939d2e95a87f2405d32eab9bdf /lib/system
parent3bc821aa5c676869d65f1448a005dfd47f197f61 (diff)
downloadNim-5f2d930a54c5b51e29b133f5e9753a8101092553.tar.gz
Bugfix: no #line dir with 0 generated
Diffstat (limited to 'lib/system')
-rwxr-xr-xlib/system/assign.nim9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/system/assign.nim b/lib/system/assign.nim
index c71525a12..798409ba5 100755
--- a/lib/system/assign.nim
+++ b/lib/system/assign.nim
@@ -13,10 +13,9 @@ proc genericAssignAux(dest, src: Pointer, n: ptr TNimNode, shallow: bool) =
     d = cast[TAddress](dest)
     s = cast[TAddress](src)
   case n.kind
-  of nkNone: assert(false)
   of nkSlot:
-    genericAssignAux(cast[pointer](d +% n.offset), cast[pointer](s +% n.offset),
-                     n.typ, shallow)
+    genericAssignAux(cast[pointer](d +% n.offset), 
+                     cast[pointer](s +% n.offset), n.typ, shallow)
   of nkList:
     for i in 0..n.len-1:
       genericAssignAux(dest, src, n.sons[i], shallow)
@@ -25,6 +24,10 @@ proc genericAssignAux(dest, src: Pointer, n: ptr TNimNode, shallow: bool) =
             n.typ.size)
     var m = selectBranch(src, n)
     if m != nil: genericAssignAux(dest, src, m, shallow)
+  else: 
+    echo "ugh memory corruption! ", n.kind
+    quit 1
+  #of nkNone: assert(false)
 
 proc genericAssignAux(dest, src: Pointer, mt: PNimType, shallow: bool) =
   var