mirror of https://github.com/jackc/pgx.git
Fix tryBaseTypeScanPlan infinite recursion
parent
c39924d0c6
commit
b99d95470f
|
@ -850,7 +850,7 @@ func tryBaseTypeScanPlan(dst interface{}) (plan *baseTypeScanPlan, nextDst inter
|
||||||
if dstValue.Kind() == reflect.Ptr {
|
if dstValue.Kind() == reflect.Ptr {
|
||||||
elemValue := dstValue.Elem()
|
elemValue := dstValue.Elem()
|
||||||
nextDstType := elemKindToBasePointerTypes[elemValue.Kind()]
|
nextDstType := elemKindToBasePointerTypes[elemValue.Kind()]
|
||||||
if nextDstType != nil {
|
if nextDstType != nil && dstValue.Type() != nextDstType {
|
||||||
return &baseTypeScanPlan{dstType: dstValue.Type(), nextDstType: nextDstType}, dstValue.Convert(nextDstType).Interface(), true
|
return &baseTypeScanPlan{dstType: dstValue.Type(), nextDstType: nextDstType}, dstValue.Convert(nextDstType).Interface(), true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue