Skip to content

Commit 379319c

Browse files
authored
Merge pull request #1407 from mattn/blob-arg-call-order
Follow documented call order for sqlite3_value_blob in callbackArgString
2 parents 518ffdb + c3e96cd commit 379319c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

callback.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ func callbackArgBytes(v *C.sqlite3_value) (reflect.Value, error) {
204204
func callbackArgString(v *C.sqlite3_value) (reflect.Value, error) {
205205
switch C.sqlite3_value_type(v) {
206206
case C.SQLITE_BLOB:
207-
l := C.sqlite3_value_bytes(v)
208207
p := (*C.char)(C.sqlite3_value_blob(v))
208+
l := C.sqlite3_value_bytes(v)
209209
return reflect.ValueOf(C.GoStringN(p, l)), nil
210210
case C.SQLITE_TEXT:
211211
c := (*C.char)(unsafe.Pointer(C.sqlite3_value_text(v)))

0 commit comments

Comments
 (0)