Simplify comparisons for most cases in llChar

This commit is contained in:
Sei Lisa 2021-05-19 22:49:14 +02:00
parent cfafb1e9d1
commit 03c33d1471

View file

@ -1132,11 +1132,11 @@ def llChar(code):
# Here's an alternative, simpler implementation that only works for Mono: # Here's an alternative, simpler implementation that only works for Mono:
if lslcommon.LSO: if lslcommon.LSO:
raise ELSLCantCompute raise ELSLCantCompute
if code <= 0 or code > 0x10FFFF:
if code == 0: if code == 0:
return u'' return u''
if code < 0: if code < 0:
return u'?' return u'?'
if code > 0x10FFFF:
if code >= 0x4000000: if code >= 0x4000000:
return u'??????' return u'??????'
if code >= 0x200000: if code >= 0x200000: