Merge pull request #348 from klightspeed/1.5-dev#fixlenrcon

Fix typo in RCON handling
This commit is contained in:
Fez Vrasta 2015-12-28 14:38:12 +01:00
commit ab6bf806dc

View File

@ -272,7 +272,7 @@ rconcmd() {
my ($sock) = @_;
my $data = "";
recv($sock, $data, 12, 0);
die "Empty response" if len($data) == 0;
die "Empty response" if length($data) == 0;
my ($pktlen, $resid, $restype) = unpack("VVV", $data);
recv($sock, $data, $pktlen - 8, 0);
return ($resid, $restype, substr($data, 0, $pktlen - 10));