Address PR feedback

This commit is contained in:
Kevin Parsons
2018-12-19 01:38:48 -08:00
parent cd4b2fefe9
commit 35e42dab22
3 changed files with 19 additions and 21 deletions
+2 -3
View File
@@ -2,7 +2,6 @@ package etw
import (
"bytes"
"encoding/binary"
)
// EventData maintains a buffer which builds up the data for an ETW event. It
@@ -18,6 +17,6 @@ func NewEventData() *EventData {
// AddString appends the data for a string to the end of the buffer.
func (ed *EventData) AddString(data string) {
binary.Write(&ed.buffer, binary.LittleEndian, []byte(data))
binary.Write(&ed.buffer, binary.LittleEndian, byte(0))
ed.buffer.Write([]byte(data))
ed.buffer.WriteByte(0)
}