aboutsummaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorThomas <thomas@xteddy.org>2014-02-05 10:47:57 +0000
committerThomas <thomas@xteddy.org>2014-02-05 10:47:57 +0000
commit6eef24c37a69c0faa12deb4374730cf02561c934 (patch)
tree181937aeab92a1a9aa3c888bb1194ba1f919ec2d /session.c
parentd02c4bda3a4b456f654fb0c1b454ba9724bff0f3 (diff)
parent57332be8da86f0e40a91d7acd857564e789027a7 (diff)
downloadrtmux-6eef24c37a69c0faa12deb4374730cf02561c934.tar.gz
rtmux-6eef24c37a69c0faa12deb4374730cf02561c934.tar.bz2
rtmux-6eef24c37a69c0faa12deb4374730cf02561c934.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'session.c')
-rw-r--r--session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/session.c b/session.c
index 66a52bc6..07307710 100644
--- a/session.c
+++ b/session.c
@@ -174,11 +174,11 @@ session_destroy(struct session *s)
RB_INSERT(sessions, &dead_sessions, s);
}
-/* Check a session name is valid: not empty and no colons. */
+/* Check a session name is valid: not empty and no colons or periods. */
int
session_check_name(const char *name)
{
- return (*name != '\0' && strchr(name, ':') == NULL);
+ return (*name != '\0' && name[strcspn(name, ":.")] == '\0');
}
/* Update session active time. */