append null to avoid message artifacts #9

Merged
jake merged 1 commits from small_dialog into master 2021-06-22 22:14:25 -04:00

View File

@ -274,7 +274,10 @@ pub struct SmallDialog {
}
impl SmallDialog {
pub fn new(msg: String) -> SmallDialog {
pub fn new(mut msg: String) -> SmallDialog {
if !msg.ends_with('\0') {
msg.push('\0');
}
SmallDialog {
padding: [0; 0x02],
msg: msg,