gamedig / rust-gamedig

Game Server Query Library.
https://crates.io/crates/gamedig
MIT License
38 stars 11 forks source link

GameSpy 1 get server values string error #72

Open CosminPerRam opened 1 year ago

CosminPerRam commented 1 year ago

While testing #62 (while comparing with the main branch) I discovered a panic on GameSpy 1 on this line: protocols\gamespy\protocols\one\protocol.rs:184 that contains as_string.remove(0);. This is caused because the string that the action is performed is empty (shouldn't be!).

Remaining data before converting to string was [00, 40, AE, 39]. Was querying a Unreal Tournament server, address: 139.162.235.20:7777.

CosminPerRam commented 1 year ago

It actually doesnt panics on main, get_string_utf8_unended (one line above the remove mentioned) fails with PacketBad.