mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +00:00
Fixed bad environment_type linux value and added error branch
This commit is contained in:
parent
401d499d61
commit
38d7758c4c
1 changed files with 5 additions and 3 deletions
|
|
@ -208,12 +208,14 @@ impl ValveProtocol {
|
|||
server_type: match buffer::get_u8(&buf, &mut pos)? {
|
||||
100 => Server::Dedicated, //'d'
|
||||
108 => Server::NonDedicated, //'l'
|
||||
_ => Server::SourceTV //'p'
|
||||
112 => Server::SourceTV, //'p'
|
||||
_ => Err(GDError::UnknownEnumCast)?
|
||||
},
|
||||
environment_type: match buffer::get_u8(&buf, &mut pos)? {
|
||||
100 => Environment::Linux, //'l'
|
||||
108 => Environment::Linux, //'l'
|
||||
119 => Environment::Windows, //'w'
|
||||
_ => Environment::Mac //'m' or 'o'
|
||||
109 | 111 => Environment::Mac, //'m' or 'o'
|
||||
_ => Err(GDError::UnknownEnumCast)?
|
||||
},
|
||||
has_password: buffer::get_u8(&buf, &mut pos)? == 1,
|
||||
vac_secured: buffer::get_u8(&buf, &mut pos)? == 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue