Skip to content

Commit

Permalink
Copy the JSON bytes when scanning so they aren't re-used by the driver.
Browse files Browse the repository at this point in the history
conorbranagan committed Mar 21, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 570d28b commit bb6d495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/types.go
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ func (j *JsonText) Scan(src interface{}) error {
default:
return errors.New("Incompatible type for JsonText")
}
*j = JsonText(source)
*j = JsonText(append((*j)[0:0], source...))
return nil
}

0 comments on commit bb6d495

Please sign in to comment.