Skip to content

Commit f6d37ce

Browse files
authored
Fix invalid sprintf
We are using `%s` but the input is not a string. This can result in bad error messages
1 parent 50fdc0b commit f6d37ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v5/patch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func (n *partialDoc) UnmarshalJSON(data []byte) error {
180180
if t, err := d.Token(); err != nil {
181181
return err
182182
} else if t != startObject {
183-
return &syntaxError{fmt.Sprintf("unexpected JSON token in document node: %s", t)}
183+
return &syntaxError{fmt.Sprintf("unexpected JSON token in document node: %v", t)}
184184
}
185185
for d.More() {
186186
k, err := d.Token()

0 commit comments

Comments
 (0)