Fix for overriding door32.sys telnet

This commit is contained in:
Andrew Pamment 2023-11-15 12:30:11 +10:00
parent 2bded3d628
commit 5328885d34

View File

@ -317,10 +317,11 @@ pub fn init() -> Result<User> {
if args.len() < 2 || 3 < args.len() { if args.len() < 2 || 3 < args.len() {
panic!("Usage: door.exe door32.sys [socket]"); panic!("Usage: door.exe door32.sys [socket]");
} }
let info = read_door32(&args[1]).expect("read door32.sys"); let mut info = read_door32(&args[1]).expect("read door32.sys");
let fd = if args.len() == 3 { let fd = if args.len() == 3 {
let fd = args[2].parse().expect("Socket is an integer"); let fd = args[2].parse().expect("Socket is an integer");
if fd > 0 { if fd > 0 {
info.typ = ConnType::Telnet(fd);
fd fd
} else if let ConnType::Telnet(fd) = info.typ { } else if let ConnType::Telnet(fd) = info.typ {
fd fd