about summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2000-12-06 01:16:12 +0000
committerClint Adams <clint@users.sourceforge.net>2000-12-06 01:16:12 +0000
commit9ff637aea05a760fb0d0826e49849d59cdb80c9b (patch)
treed2af11b66685e32f94cc26a796b9f2434d44e339 /Src/Modules
parentfade355d03e32ebe1769d8586c5cbca91cf908ed (diff)
downloadzsh-9ff637aea05a760fb0d0826e49849d59cdb80c9b.tar.gz
zsh-9ff637aea05a760fb0d0826e49849d59cdb80c9b.tar.xz
zsh-9ff637aea05a760fb0d0826e49849d59cdb80c9b.zip
13242: don't segfault on $terminfo[nonexistentcap]
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/terminfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c
index 52b0b27f8..512f4b474 100644
--- a/Src/Modules/terminfo.c
+++ b/Src/Modules/terminfo.c
@@ -165,7 +165,7 @@ getterminfo(HashTable ht, char *name)
 	pm->u.str = num ? dupstring("yes") : dupstring("no");
 	pm->flags |= PM_SCALAR;
     }
-    else if ((tistr = (char *)tigetstr(name)) != NULL)
+    else if ((tistr = (char *)tigetstr(name)) != NULL && tistr != (char *)-1)
     {
 	pm->u.str = dupstring(tistr);
 	pm->flags |= PM_SCALAR;