From cc57a0430bd1aeedc9b58a9e0e5fe50d108bf256 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 1 Jul 2015 00:58:02 +0200 Subject: [PATCH] fixes #3028 --- compiler/vm.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/vm.nim b/compiler/vm.nim index 23fd6c8b10..a8972f420e 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -351,7 +351,7 @@ proc opConv*(dest: var TFullReg, src: TFullReg, desttyp, srctyp: PType): bool = myreset(dest); dest.kind = rkFloat case skipTypes(srctyp, abstractRange).kind of tyInt..tyInt64, tyUInt..tyUInt64, tyEnum, tyBool, tyChar: - dest.floatVal = toFloat(src.intVal.int) + dest.floatVal = toBiggestFloat(src.intVal) else: dest.floatVal = src.floatVal else: