From: Kenichi Handa Date: Thu, 21 Aug 2003 11:36:40 +0000 (+0000) Subject: (term_init): Fix previous change X-Git-Tag: ttn-vms-21-2-B4~9019 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f730033e6c12eeb6d4d12778bb9ddc3d02e99653;p=emacs.git (term_init): Fix previous change --- diff --git a/src/ChangeLog b/src/ChangeLog index 07963de9e1b..fc8ce43d766 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-08-21 Kenichi Handa + + * term.c (term_init): Fix previous change; don't rely on the + length of `buffer' if TERMINFO is defined. + 2003-08-20 Dave Love * atimer.h: Include lisp.h. diff --git a/src/term.c b/src/term.c index 506fc16ffb3..bae059ea439 100644 --- a/src/term.c +++ b/src/term.c @@ -2229,14 +2229,12 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.", #endif } -#ifdef TERMINFO - area = (char *) xmalloc (buffer_size); -#else +#ifndef TERMINFO if (strlen (buffer) >= buffer_size) abort (); - - area = (char *) xmalloc (strlen (buffer)); + buffer_size = strlen (buffer); #endif + area = (char *) xmalloc (buffer_size); TS_ins_line = tgetstr ("al", address); TS_ins_multi_lines = tgetstr ("AL", address);