summary refs log tree commit diff stats
path: root/compiler/vm.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-03-27 19:20:59 +0100
committerAraq <rumpf_a@web.de>2014-03-27 19:20:59 +0100
commit3365b42bbe5e09f8e8a739597ae5e49e2ff2c259 (patch)
tree4d8ded5ab336ab4a3e07679dbc1ddd1d1cf5fbd0 /compiler/vm.nim
parentdc956c485aa9d8becd3d9eb3c2086ebac3b6eeed (diff)
downloadNim-3365b42bbe5e09f8e8a739597ae5e49e2ff2c259.tar.gz
fixes #1009
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r--compiler/vm.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 268289aca..0d5386502 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -318,7 +318,7 @@ proc opConv*(dest: var TFullReg, src: TFullReg, desttyp, srctyp: PType): bool =
       of tyFloat..tyFloat64:
         dest.intVal = system.toInt(src.floatVal)
       else:
-        dest.intVal = src.intVal and ((1 shl desttyp.size)-1)
+        dest.intVal = src.intVal and ((1 shl (desttyp.size*8))-1)
     of tyFloat..tyFloat64:
       if dest.kind != rkFloat:
         myreset(dest); dest.kind = rkFloat