fix for Writer.String

This commit is contained in:
Andrew Po
2016-04-04 15:58:13 +03:00
parent fd33451b04
commit 02a08ab4b1
+2 -2
View File
@@ -156,11 +156,11 @@ func (w *Writer) String(s string) {
}
}
if escape != 0 {
w.Buffer.AppendString(s[p:])
w.Buffer.AppendString(s[p:i])
w.Buffer.AppendByte('\\')
w.Buffer.AppendByte(escape)
} else {
w.Buffer.AppendString(s[p:])
w.Buffer.AppendString(s[p:i])
w.Buffer.AppendString(`\u00`)
w.Buffer.AppendByte(hex(c >> 4))
w.Buffer.AppendByte(hex(c))