Browse Source

append null to avoid message artifacts

pull/9/head
andy 4 years ago
parent
commit
faab6e8fd6
  1. 5
      src/packet/ship.rs

5
src/packet/ship.rs

@ -274,7 +274,10 @@ pub struct SmallDialog {
} }
impl 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 { SmallDialog {
padding: [0; 0x02], padding: [0; 0x02],
msg: msg, msg: msg,

Loading…
Cancel
Save