summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-03-04 23:26:44 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-03-04 23:26:44 +0000
commitd5ed5fb08ff83a2cc38292b3eb0addab21ce6282 (patch)
treef106292794e4ec94ae127bf6c1edfa40e56717d7 /tmux.c
parentc36f67a2889ae0f5792ea88e8206d5d7db8c4839 (diff)
Two fixes by Micah Cowan: make mouse work properly beyond >127 on signed
char architectures and properly parse $TMUX by stopping the socket path at the first comma.
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tmux.c b/tmux.c
index 31070f00..196edf6c 100644
--- a/tmux.c
+++ b/tmux.c
@@ -132,7 +132,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;