diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-03-18 15:07:51 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-03-18 15:07:51 +0000 |
commit | acb2413852b98745b69459d0cdd0d9698cb75e2c (patch) | |
tree | 6af803240715b8a6bccc328d5eda14f237e44944 /tty-keys.c | |
parent | aa2b3472c515dd1e5f57618e17c0c612cfa3c117 (diff) | |
parent | ce6be7afd4d10b542f9cce8634d6bdd81754f775 (diff) | |
download | rtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.tar.gz rtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.tar.bz2 rtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -398,9 +398,10 @@ tty_keys_build(struct tty *tty) { const struct tty_default_key_raw *tdkr; const struct tty_default_key_code *tdkc; - u_int i, size; + u_int i; const char *s, *value; struct options_entry *o; + struct options_array_item *a; if (tty->key_tree != NULL) tty_keys_free(tty); @@ -423,11 +424,13 @@ tty_keys_build(struct tty *tty) } o = options_get(global_options, "user-keys"); - if (o != NULL && options_array_size(o, &size) != -1) { - for (i = 0; i < size; i++) { - value = options_array_get(o, i); + if (o != NULL) { + a = options_array_first(o); + while (a != NULL) { + value = options_array_item_value(a); if (value != NULL) tty_keys_add(tty, value, KEYC_USER + i); + a = options_array_next(a); } } } |