diff --git a/src/packet/ship.rs b/src/packet/ship.rs index 27f5fd8..3a1af66 100644 --- a/src/packet/ship.rs +++ b/src/packet/ship.rs @@ -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,