mirror of
https://github.com/lalbornoz/roar.git
synced 2024-12-23 04:46:37 +00:00
MiRC2png.py:MiRC2png._syncColourSpecState(): handle empty mIRC colour control code sequences.
This commit is contained in:
parent
496e4c7a4b
commit
ba99dc1280
17
MiRC2png.py
17
MiRC2png.py
@ -209,14 +209,15 @@ class MiRC2png:
|
||||
# }}}
|
||||
# {{{ _syncColourSpecState(): XXX
|
||||
def _syncColourSpecState(self, colourSpec):
|
||||
colourSpec = colourSpec.split(",")
|
||||
if len(colourSpec) == 2:
|
||||
self.outCurColourFg = int(colourSpec[0])
|
||||
self.outCurColourBg = int(colourSpec[1] or self.outCurColourBg)
|
||||
elif len(colourSpec) == 1:
|
||||
self.outCurColourFg = int(colourSpec[0])
|
||||
else:
|
||||
self.outCurColourBg = 1; self.outCurColourFg = 15;
|
||||
if len(colourSpec) > 0:
|
||||
colourSpec = colourSpec.split(",")
|
||||
if len(colourSpec) == 2:
|
||||
self.outCurColourFg = int(colourSpec[0])
|
||||
self.outCurColourBg = int(colourSpec[1] or self.outCurColourBg)
|
||||
elif len(colourSpec) == 1:
|
||||
self.outCurColourFg = int(colourSpec[0])
|
||||
else:
|
||||
self.outCurColourBg = 1; self.outCurColourFg = 15;
|
||||
return True
|
||||
# }}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user