mirror of
https://github.com/onyx-and-iris/q3rcon-ps.git
synced 2026-02-21 00:59:11 +00:00
fixes bug skipping first char of response
This commit is contained in:
parent
cb90ad8030
commit
9209c705ce
@ -122,7 +122,7 @@ class Base {
|
||||
try {
|
||||
$bytesReceived = $this._socket.Receive($this._receiveBuffer)
|
||||
if ($bytesReceived -gt 0) {
|
||||
$dataStartIndex = [Math]::Min($headerLength, $bytesReceived)
|
||||
$dataStartIndex = [Math]::Min($headerLength - 1, $bytesReceived)
|
||||
$responseText = [System.Text.Encoding]::ASCII.GetString($this._receiveBuffer, $dataStartIndex, $bytesReceived - $dataStartIndex)
|
||||
$responseData.Append($responseText) | Out-Null
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user