mirror of https://github.com/Calamitous/iris.git
Fix crash when receiving invalid UTF-8 characters
This commit is contained in:
parent
7c3fad429e
commit
b3d3640f97
1
iris.rb
1
iris.rb
|
@ -841,6 +841,7 @@ class Interface
|
||||||
end
|
end
|
||||||
|
|
||||||
def replying_handler(line)
|
def replying_handler(line)
|
||||||
|
line.encode!('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
|
||||||
if line !~ /^\.$/
|
if line !~ /^\.$/
|
||||||
if @text_buffer.empty?
|
if @text_buffer.empty?
|
||||||
@text_buffer = line
|
@text_buffer = line
|
||||||
|
|
Loading…
Reference in New Issue