=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/options.c,v retrieving revision 1.37 retrieving revision 1.38 diff -c -r1.37 -r1.38 *** src/usr.bin/tmux/options.c 2019/03/14 09:53:52 1.37 --- src/usr.bin/tmux/options.c 2019/03/15 21:54:47 1.38 *************** *** 1,4 **** ! /* $OpenBSD: options.c,v 1.37 2019/03/14 09:53:52 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: options.c,v 1.38 2019/03/15 21:54:47 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott *************** *** 169,180 **** struct options_entry * options_default(struct options *oo, const struct options_table_entry *oe) { ! struct options_entry *o; o = options_empty(oo, oe); ! if (oe->type == OPTIONS_TABLE_ARRAY) ! options_array_assign(o, oe->default_str); ! else if (oe->type == OPTIONS_TABLE_STRING) o->string = xstrdup(oe->default_str); else if (oe->type == OPTIONS_TABLE_STYLE) { style_set(&o->style, &grid_default_cell); --- 169,185 ---- struct options_entry * options_default(struct options *oo, const struct options_table_entry *oe) { ! struct options_entry *o; ! u_int i; o = options_empty(oo, oe); ! if (oe->type == OPTIONS_TABLE_ARRAY) { ! if (oe->default_arr != NULL) { ! for (i = 0; oe->default_arr[i] != NULL; i++) ! options_array_set(o, i, oe->default_arr[i], 0); ! } else ! options_array_assign(o, oe->default_str); ! } else if (oe->type == OPTIONS_TABLE_STRING) o->string = xstrdup(oe->default_str); else if (oe->type == OPTIONS_TABLE_STYLE) { style_set(&o->style, &grid_default_cell);