diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-03-04 23:26:44 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-03-04 23:26:44 +0000 |
commit | d5ed5fb08ff83a2cc38292b3eb0addab21ce6282 (patch) | |
tree | f106292794e4ec94ae127bf6c1edfa40e56717d7 | |
parent | c36f67a2889ae0f5792ea88e8206d5d7db8c4839 (diff) | |
download | rtmux-d5ed5fb08ff83a2cc38292b3eb0addab21ce6282.tar.gz rtmux-d5ed5fb08ff83a2cc38292b3eb0addab21ce6282.tar.bz2 rtmux-d5ed5fb08ff83a2cc38292b3eb0addab21ce6282.zip |
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.
-rw-r--r-- | tmux.c | 2 | ||||
-rw-r--r-- | tty-keys.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -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; @@ -630,10 +630,10 @@ tty_keys_mouse(struct tty *tty, utf8_append(&utf8data, buf[*size]); value = utf8_combine(&utf8data); } else - value = buf[*size]; + value = (unsigned char)buf[*size]; (*size)++; } else { - value = buf[*size]; + value = (unsigned char)buf[*size]; (*size)++; } |