fix layout of text boxes being completely fucked

This commit is contained in:
Alula 2021-06-27 08:02:47 +02:00
parent 2b873a92a2
commit d1ca07c297
No known key found for this signature in database
GPG Key ID: 3E00485503A1D8BA
1 changed files with 3 additions and 2 deletions

View File

@ -1870,14 +1870,15 @@ impl TextScript {
}
b'<' => {
allow_next_event = false;
if !char_buf.is_empty() {
if char_buf.len() > 2 {
if let Some(&c) = char_buf.last() {
if c == b'\n' {
let _ = char_buf.pop();
}
}
}
if !char_buf.is_empty() {
TextScript::put_string(&mut char_buf, &mut bytecode, encoding);
}