another pace where we might (and in my case did) get invalid utf8

This commit is contained in:
holger krekel
2019-07-20 12:37:51 +02:00
parent d6de420b9a
commit fa09e46ed9

View File

@@ -225,7 +225,8 @@ unsafe fn dc_simplify_simplify_plain_text(
pending_linebreaks -= 1
}
}
ret += &to_string(line);
// the incoming message might contain invalid UTF8
ret += &to_string_lossy(line);
content_lines_added += 1;
pending_linebreaks = 1i32
}