diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-10-23 08:03:28 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-10-23 08:03:28 +0000 |
commit | 2ca20765e89b9b90135216a20543db37b370598f (patch) | |
tree | 55c71cb1b4a59969020f61d39e876f2f889e54fe /usr.bin | |
parent | 5da922ca50780dc4f26ae3cbae71c3a97cd9b78b (diff) |
Ignore LC_ALL and LC_CTYPE if they are empty as well as unset.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/tmux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c index d5320ea1d18..9b0f197e6ed 100644 --- a/usr.bin/tmux/tmux.c +++ b/usr.bin/tmux/tmux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.c,v 1.105 2011/09/25 18:53:04 nicm Exp $ */ +/* $OpenBSD: tmux.c,v 1.106 2011/10/23 08:03:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -289,8 +289,8 @@ main(int argc, char **argv) * if not they know that output from UTF-8-capable programs may * be wrong. */ - if ((s = getenv("LC_ALL")) == NULL) { - if ((s = getenv("LC_CTYPE")) == NULL) + if ((s = getenv("LC_ALL")) == NULL || *s == '\0') { + if ((s = getenv("LC_CTYPE")) == NULL || *s == '\0') s = getenv("LANG"); } if (s != NULL && (strcasestr(s, "UTF-8") != NULL || |