summaryrefslogtreecommitdiff
path: root/libps
diff options
context:
space:
mode:
Diffstat (limited to 'libps')
-rw-r--r--libps/tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libps/tty.c b/libps/tty.c
index d668827f..f7602a96 100644
--- a/libps/tty.c
+++ b/libps/tty.c
@@ -130,7 +130,7 @@ ps_tty_short_name(ps_tty_t tty)
{
if (name[pfx_len] == '\0')
tty->short_name = abbrev->subst;
- else if ((subst[0] = '\0'))
+ else if (!subst || subst[0] == '\0')
tty->short_name = name + pfx_len;
else
{