Skip to content

Commit

Permalink
Merge pull request #655 from typeless/fix-too-large-arrary-error-v2
Browse files Browse the repository at this point in the history
Fix build failure of incorrect expression for unsafe.Sizeof
  • Loading branch information
mattn committed Oct 24, 2018
2 parents 276457a + 576a2cb commit c7c4067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlite3_opt_unlock_notify.go
Expand Up @@ -60,7 +60,7 @@ func (t *unlock_notify_table) get(h uint) chan struct{} {
//export unlock_notify_callback
func unlock_notify_callback(argv unsafe.Pointer, argc C.int) {
for i := 0; i < int(argc); i++ {
parg := ((*(*[(math.MaxInt32 - 1) / unsafe.Sizeof(uintptr)]*[1]uint)(argv))[i])
parg := ((*(*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.uint)(nil))]*[1]uint)(argv))[i])
arg := *parg
h := arg[0]
c := unt.get(h)
Expand Down

0 comments on commit c7c4067

Please sign in to comment.