summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorMicah Cowan <micah@micah.cowan.name>2011-03-04 23:13:56 +0000
committerMicah Cowan <micah@micah.cowan.name>2011-03-04 23:13:56 +0000
commit4cb976b4087f99e9c5ad946a90dfac89d7a20cc6 (patch)
tree75d8e68fbf1d4835500c6bf19fa69cca40164a22 /tmux.c
parentc0888f3fd1c4fbaf4c4a9c31f341f35b967a0a55 (diff)
Fix sscanf that was guaranteed to always fail.
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmux.c b/tmux.c
index 5b036c30..850356df 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.236 2011-02-14 23:11:33 tcunha Exp $ */
+/* $Id: tmux.c,v 1.237 2011-03-04 23:13:56 micahcowan Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -135,7 +135,7 @@ parseenvironment(void)
if ((env = getenv("TMUX")) == NULL)
return;
- if (sscanf(env, "%255s,%ld,%d", path, &pid, &idx) != 3)
+ if (sscanf(env, "%255[^,],%ld,%d", path, &pid, &idx) != 3)
return;
environ_path = xstrdup(path);
environ_pid = pid;