summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-07-21 12:58:02 +0000
committernicm <nicm@openbsd.org>2017-07-21 12:58:02 +0000
commitd4dc61b7fc43052fa85ca01e6db9d58bd99e8a6a (patch)
tree73f184c469c4414f3cc26ea120707599699f1baf
parentFixup too much indentation (diff)
downloadwireguard-openbsd-d4dc61b7fc43052fa85ca01e6db9d58bd99e8a6a.tar.xz
wireguard-openbsd-d4dc61b7fc43052fa85ca01e6db9d58bd99e8a6a.zip
Allow ispunct() as well as isalnum() when parsing initial window names.
-rw-r--r--usr.bin/tmux/names.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/names.c b/usr.bin/tmux/names.c
index 9fa8d0c9ac8..6e897a28aa4 100644
--- a/usr.bin/tmux/names.c
+++ b/usr.bin/tmux/names.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: names.c,v 1.40 2017/05/01 12:20:55 nicm Exp $ */
+/* $OpenBSD: names.c,v 1.41 2017/07/21 12:58:02 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -151,7 +151,9 @@ parse_window_name(const char *in)
if (*name != '\0') {
ptr = name + strlen(name) - 1;
- while (ptr > name && !isalnum((u_char)*ptr))
+ while (ptr > name &&
+ !isalnum((u_char)*ptr) &&
+ !ispunct((u_char)*ptr))
*ptr-- = '\0';
}