From 443b5a22581ca5a19c3bfafb2c33b7a032c273fe Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Mon, 28 Jul 2014 18:13:48 +0200 Subject: [PATCH] Fix bug where floats in global lists would be output as integers. --- lslopt/lsloutput.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lslopt/lsloutput.py b/lslopt/lsloutput.py index 095bcef..e794987 100644 --- a/lslopt/lsloutput.py +++ b/lslopt/lsloutput.py @@ -42,9 +42,9 @@ class outscript(object): return str(value) if tvalue == float: if self.optsigns and value.is_integer() and -2147483648.0 <= value < 2147483648.0: - if self.globalmode:# or value >= 0: + if self.globalmode and not self.listmode:# or value >= 0: return str(int(value)) - else: + elif not self.globalmode: # Important inside lists!! return '((float)' + str(int(value)) + ')' s = str(value)