diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/rendertext.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/render/rendertext.nim b/src/render/rendertext.nim index d0576c75..ed79d60f 100644 --- a/src/render/rendertext.nim +++ b/src/render/rendertext.nim @@ -21,6 +21,8 @@ proc newStreamRenderer*(stream: Stream, charsets: seq[Charset]): StreamRenderer result.ansiparser.state = PARSE_DONE for i in countdown(charsets.high, 0): result.charsets.add(charsets[i]) + if charsets.len == 0: + result.charsets = @[DefaultCharset] let cs = result.charsets.pop() let em = if charsets.len > 0: DECODER_ERROR_MODE_FATAL |