Output negative integers as hex.

This commit is contained in:
Sei Lisa 2014-07-27 01:27:37 +02:00
parent e2918e7f05
commit ecaa4b1af0

View file

@ -17,6 +17,8 @@ class outscript(object):
raise lslfuncs.ELSLTypeMismatch raise lslfuncs.ELSLTypeMismatch
return '"' + value.encode('utf8').replace('\\','\\\\').replace('"','\\"').replace('\n','\\n') + '"' return '"' + value.encode('utf8').replace('\\','\\\\').replace('"','\\"').replace('\n','\\n') + '"'
if type(value) == int: if type(value) == int:
if value < 0:
return '0x%X' % (value + 4294967296)
return str(value) return str(value)
if type(value) == float: if type(value) == float:
s = str(value) s = str(value)