=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-set-option.c,v retrieving revision 1.121 retrieving revision 1.122 diff -c -r1.121 -r1.122 *** src/usr.bin/tmux/cmd-set-option.c 2019/03/16 17:14:07 1.121 --- src/usr.bin/tmux/cmd-set-option.c 2019/03/18 11:58:40 1.122 *************** *** 1,4 **** ! /* $OpenBSD: cmd-set-option.c,v 1.121 2019/03/16 17:14:07 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-set-option.c,v 1.122 2019/03/18 11:58:40 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 163,173 **** parent = options_get(oo, name); /* Check that array options and indexes match up. */ ! if (idx != -1) { ! if (*name == '@' || options_array_size(parent, NULL) == -1) { ! cmdq_error(item, "not an array: %s", argument); ! goto fail; ! } } /* With -o, check this option is not already set. */ --- 163,171 ---- parent = options_get(oo, name); /* Check that array options and indexes match up. */ ! if (idx != -1 && (*name == '@' || !options_isarray(parent))) { ! cmdq_error(item, "not an array: %s", argument); ! goto fail; } /* With -o, check this option is not already set. */ *************** *** 209,215 **** goto fail; } options_set_string(oo, name, append, "%s", value); ! } else if (idx == -1 && options_array_size(parent, NULL) == -1) { error = cmd_set_option_set(self, item, oo, parent, value); if (error != 0) goto fail; --- 207,213 ---- goto fail; } options_set_string(oo, name, append, "%s", value); ! } else if (idx == -1 && !options_isarray(parent)) { error = cmd_set_option_set(self, item, oo, parent, value); if (error != 0) goto fail;