Skip to content

Commit e95be54

Browse files
committed
Trim NUL bytes from rcon output, fixes #51
1 parent 0e55ddd commit e95be54

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

SourceQuery/SourceRcon.class.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,7 @@ public function Command( $Command )
162162
while( true );
163163
}
164164

165-
// TODO: It should use GetString, but there are no null bytes at the end, why?
166-
// $Buffer = $this->Buffer->GetString( );
167-
return $Buffer;
165+
return rtrim( $Buffer, "\0" );
168166
}
169167

170168
public function Authorize( $Password )

0 commit comments

Comments
 (0)