mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Protocol] Replace some usage of remaining_length with the more appropiate is_remaining_empty
This commit is contained in:
parent
8fe521749a
commit
dd80d6309f
4 changed files with 6 additions and 6 deletions
|
|
@ -64,7 +64,7 @@ fn parse_players_and_teams(packet: Vec<u8>) -> GDResult<Vec<Player>> {
|
|||
let count = buf.get_u16()?;
|
||||
let mut players = Vec::with_capacity(count as usize);
|
||||
|
||||
while buf.remaining_length() > 0 {
|
||||
while !buf.is_remaining_empty() {
|
||||
players.push(Player {
|
||||
name: buf.get_string_utf8()?,
|
||||
steam_id: buf.get_string_utf8()?,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue