fix writeUtf8 for ssh player

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith
2023-09-20 19:40:58 +01:00
parent 04a71800fa
commit e32cceb1b4
2 changed files with 6 additions and 6 deletions

View File

@@ -181,10 +181,10 @@
}
function tunnelUpdate(data) {
if (typeof data == 'string') {
term.writeUtf8(data);
if (term.writeUtf8) {
if (typeof data == 'string') { term.writeUtf8(data); } else { term.writeUtf8(new Uint8Array(data)); }
} else {
term.writeUtf8(new Uint8Array(data));
if (typeof data == 'string') { term.write(data); } else { term.write(new Uint8Array(data)); }
}
}