fixes bug skipping first char of response

This commit is contained in:
onyx-and-iris 2026-02-18 11:18:25 +00:00
parent cb90ad8030
commit 9209c705ce

View File

@ -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
}