Skip to content

Commit c352e8f

Browse files
authored
fix: fix a bug for escaping 0xE2 0x80 0xA8 in compactString (#479)
1 parent df897ae commit c352e8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/encoder/compact.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ func compactString(dst, src []byte, cursor int64, escape bool) ([]byte, int64, e
213213
dst = append(dst, src[start:cursor]...)
214214
dst = append(dst, `\u202`...)
215215
dst = append(dst, hex[src[cursor+2]&0xF])
216-
cursor += 2
217216
start = cursor + 3
217+
cursor += 2
218218
}
219219
}
220220
switch c {

0 commit comments

Comments
 (0)