Fix tryBaseTypeScanPlan infinite recursion
This commit is contained in:
+1
-1
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user