Fix the pointer initialization
If the overwriteStruct() finds an uninitialized pointer, it tries to initialize it, but does it incorrectly. It tries to assign a pointer to pointer, instead of pointer. Signed-off-by: Gladkov Alexey <agladkov@redhat.com>master
							parent
							
								
									e5b5e44386
								
							
						
					
					
						commit
						c9eba1a5bb
					
				|  | @ -220,7 +220,7 @@ func (p *Parser) overwriteStruct(v reflect.Value, fullpath string, path []string | |||
| 		} | ||||
| 	case reflect.Ptr: | ||||
| 		if field.IsNil() { | ||||
| 			field.Set(reflect.New(sf.Type)) | ||||
| 			field.Set(reflect.New(field.Type().Elem())) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue