Skip to content

Commit

Permalink
fix go wrapper callback interface not []byte (FISCO-BCOS#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust authored and kyonRay committed Nov 21, 2024
1 parent f3a22cf commit b9ba32f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bindings/go/csdk/csdk_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ func on_callback_once(resp *C.struct_bcos_sdk_c_struct_response) {
var respData Response
if int(resp.error) != 0 {
respData.Err = fmt.Errorf("something is wrong, error: %d, errorMessage: %s", resp.error, C.GoString(resp.desc))
respData.Result = []byte{}
} else {
respData.Result = C.GoBytes(unsafe.Pointer(resp.data), C.int(resp.size))
}
Expand Down

0 comments on commit b9ba32f

Please sign in to comment.