From 57cacf29bbfcc492ded00df5facee5a8080ae001 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Tue, 22 Sep 2015 14:14:26 +0200 Subject: [PATCH] Return a float when typecasting returns zero (fixes inconsistent type) --- lslopt/lslbasefuncs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index 17b62e7..4ffeb2f 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -351,7 +351,7 @@ def InternalTypecast(val, out, InList, f32): if not lslcommon.LSO and abs(ret) < 1.1754943508222875e-38: # Mono doesn't return denormals when using (float)"val" # (but it returns them when using (vector)"") - ret = 0 + ret = 0.0 return ret if out == int: match = int_re.match(val)