Had to stop production as I ran out of copilot credits
This commit is contained in:
+9
-3
@@ -313,9 +313,15 @@ namespace PainoBar_Helper
|
||||
|
||||
lock (_inputLock)
|
||||
{
|
||||
// Use LF explicitly to avoid CRLF handling issues with redirected stdin.
|
||||
_inputWriter.Write(command);
|
||||
_inputWriter.Write('\n');
|
||||
// Convert to ASCII bytes with Unix LF to avoid StreamWriter text encoding issues
|
||||
// that can cause Pianobar's C-runtime to see extra characters
|
||||
byte[] bytes = System.Text.Encoding.ASCII.GetBytes(command + "\n");
|
||||
|
||||
// Write raw bytes directly to base stream, bypassing StreamWriter
|
||||
_inputWriter.BaseStream.Write(bytes, 0, bytes.Length);
|
||||
|
||||
// Flush both base stream and StreamWriter buffers immediately
|
||||
_inputWriter.BaseStream.Flush();
|
||||
_inputWriter.Flush();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user