Fix llList2CSV with -nan in vector and quaternion (with test case).
This commit is contained in:
@@ -986,7 +986,7 @@ def llList2CSV(lst):
|
||||
else:
|
||||
ret.append(u'%.6f' % elem)
|
||||
elif type(elem) in (Vector, Quaternion):
|
||||
ret.append(u'<' + u', '.join(list(u'%.6f' % x for x in elem)) + u'>')
|
||||
ret.append(u'<' + llList2CSV(list(elem)) + u'>')
|
||||
else:
|
||||
ret.append(InternalTypecast(elem, unicode, InList=True, f32=True))
|
||||
ret = u', '.join(ret)
|
||||
|
||||
@@ -835,6 +835,7 @@ def do_tests():
|
||||
test('llList2CSV([llSqrt(F32(-1))])', u'-nan')
|
||||
test('llList2CSV([llPow(-1.0,F32(1.3))])', u'-nan')
|
||||
test('llList2CSV([llPow(nan,F32(1.3))])', u'nan')
|
||||
test('llList2CSV([Vector((-nan,nan,-inf))])', u'<-nan, nan, -inf>')
|
||||
|
||||
testXB64S("", "", "")
|
||||
testXB64S(u"Hello, World!", u"", u"Hello, World!")
|
||||
|
||||
Reference in New Issue
Block a user