Fix broken getcap call - it was always returning NULL. Thanks Itojun
for spotting this one!
This commit is contained in:
parent
6a7eb13fc4
commit
fb6ac2def9
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: setterm.c,v 1.23 2000/05/19 01:05:44 mycroft Exp $ */
|
/* $NetBSD: setterm.c,v 1.24 2000/06/03 06:33:12 blymn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1981, 1993, 1994
|
* Copyright (c) 1981, 1993, 1994
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
|
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: setterm.c,v 1.23 2000/05/19 01:05:44 mycroft Exp $");
|
__RCSID("$NetBSD: setterm.c,v 1.24 2000/06/03 06:33:12 blymn Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -340,12 +340,11 @@ getcap(char *name)
|
||||||
char *new_tspace;
|
char *new_tspace;
|
||||||
|
|
||||||
/* verify cap exists and grab size of it at the same time */
|
/* verify cap exists and grab size of it at the same time */
|
||||||
if (t_getstr(_cursesi_genbuf, name, NULL, &ent_size) == ERR)
|
t_getstr(_cursesi_genbuf, name, NULL, &ent_size);
|
||||||
return ERR;
|
|
||||||
|
|
||||||
/* grow tspace to hold the new cap */
|
/* grow tspace to hold the new cap */
|
||||||
if ((new_tspace = realloc(tspace, ent_size + tspace_size)) == NULL)
|
if ((new_tspace = realloc(tspace, ent_size + tspace_size)) == NULL)
|
||||||
return ERR;
|
return NULL;
|
||||||
|
|
||||||
/* point aoftspace to the same place in the newly allocated buffer */
|
/* point aoftspace to the same place in the newly allocated buffer */
|
||||||
offset = aoftspace - tspace;
|
offset = aoftspace - tspace;
|
||||||
|
|
Loading…
Reference in New Issue