Fix bug where floats in global lists would be output as integers.

This commit is contained in:
Sei Lisa 2014-07-28 18:13:48 +02:00
parent a6b3a0946f
commit 443b5a2258

View file

@ -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)