diff options
author | Araq <rumpf_a@web.de> | 2011-08-20 15:36:26 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-08-20 15:36:26 +0200 |
commit | 82af6387d9ab74675fb9ef70f36aa2a914a89191 (patch) | |
tree | f52be21dac370bc0e014cdb2c88767ad4a23459a /lib | |
parent | dd190a5c01ed904d844584074f729ee9cd677a3e (diff) | |
download | Nim-82af6387d9ab74675fb9ef70f36aa2a914a89191.tar.gz |
bugfix: fixed built-in 'reset'
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/system/assign.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/assign.nim b/lib/system/assign.nim index 33bfa15f3..464dfb36c 100755 --- a/lib/system/assign.nim +++ b/lib/system/assign.nim @@ -139,10 +139,10 @@ proc genericResetAux(dest: Pointer, n: ptr TNimNode) = of nkList: for i in 0..n.len-1: genericResetAux(dest, n.sons[i]) of nkCase: - zeroMem(cast[pointer](d +% n.offset), n.typ.size) var m = selectBranch(dest, n) if m != nil: genericResetAux(dest, m) - + zeroMem(cast[pointer](d +% n.offset), n.typ.size) + proc genericReset(dest: Pointer, mt: PNimType) = var d = cast[TAddress](dest) sysAssert(mt != nil) |