Skip to content

Commit bb6d495

Browse files
committed
Copy the JSON bytes when scanning so they aren't re-used by the driver.
1 parent 570d28b commit bb6d495

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (j *JsonText) Scan(src interface{}) error {
8585
default:
8686
return errors.New("Incompatible type for JsonText")
8787
}
88-
*j = JsonText(source)
88+
*j = JsonText(append((*j)[0:0], source...))
8989
return nil
9090
}
9191

0 commit comments

Comments
 (0)