From c8cae015605f4c24f01087a61127d13d72b35161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Thomas?= Date: Wed, 30 Dec 2015 06:24:28 +0100 Subject: [PATCH] Fix terminal data being interpreted as format string. This caused invalid % sequences to be replaced with %!X(MISSING) in the terminal. --- gotty-client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gotty-client.go b/gotty-client.go index 562896e..98d0fe2 100644 --- a/gotty-client.go +++ b/gotty-client.go @@ -352,7 +352,7 @@ func (c *Client) readLoop(done chan bool, wg *sync.WaitGroup) { logrus.Warnf("Invalid base64 content: %q", msg.Data[1:]) break } - fmt.Fprintf(c.Output, string(buf)) + c.Output.Write(buf) case '1': // pong case '2': // new title newTitle := string(msg.Data[1:])