vdoc: fix segfault on `v doc -m -f html vlib`
							parent
							
								
									ffedbe4b81
								
							
						
					
					
						commit
						02bef1ae2b
					
				|  | @ -97,7 +97,7 @@ fn main() { | |||
| 
 | ||||
| fn process_cli_args() &Context { | ||||
| 	mut context := &Context{ | ||||
| 		pref: 0 | ||||
| 		pref: pref.new_preferences() | ||||
| 	} | ||||
| 	context.myself = os.executable() | ||||
| 	mut fp := flag.new_flag_parser(os.args_after('test-parser')) | ||||
|  |  | |||
|  | @ -113,7 +113,7 @@ pub fn new(input_path string) Doc { | |||
| 		time_generated: time.now() | ||||
| 	} | ||||
| 	d.fmt = fmt.Fmt{ | ||||
| 		pref: 0 | ||||
| 		pref: d.prefs | ||||
| 		indent: 0 | ||||
| 		is_debug: false | ||||
| 		table: d.table | ||||
|  |  | |||
|  | @ -10,8 +10,8 @@ pub const ( | |||
| 	default_module_path = os.vmodules_dir() | ||||
| ) | ||||
| 
 | ||||
| pub fn new_preferences() Preferences { | ||||
| 	mut p := Preferences{} | ||||
| pub fn new_preferences() &Preferences { | ||||
| 	mut p := &Preferences{} | ||||
| 	p.fill_with_defaults() | ||||
| 	return p | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue