diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-04-22 10:05:54 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-04-22 10:05:54 +0100 |
commit | 0a88377086329786c438d4973365fdb21186f4e4 (patch) | |
tree | df5b091b400df84974f58bbfbb78ee26ccb9a5f6 /cmd.c | |
parent | b25dc423b0b1369aaec5dee8e051d541bd55043f (diff) | |
parent | 3909aff06aa6de748ae057cab1e723eec2387edd (diff) | |
download | rtmux-0a88377086329786c438d4973365fdb21186f4e4.tar.gz rtmux-0a88377086329786c438d4973365fdb21186f4e4.tar.bz2 rtmux-0a88377086329786c438d4973365fdb21186f4e4.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -780,15 +780,15 @@ cmd_lookup_index(struct session *s, const char *name, int *ambiguous) const char *errstr; u_int idx; + idx = strtonum(name, 0, INT_MAX, &errstr); + if (errstr == NULL) + return (idx); + if ((wl = cmd_lookup_window(s, name, ambiguous)) != NULL) return (wl->idx); if (*ambiguous) return (-1); - idx = strtonum(name, 0, INT_MAX, &errstr); - if (errstr == NULL) - return (idx); - return (-1); } |