From f730033e6c12eeb6d4d12778bb9ddc3d02e99653 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 21 Aug 2003 11:36:40 +0000 Subject: (term_init): Fix previous change --- src/ChangeLog | 5 +++++ src/term.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src') 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); -- cgit v1.2.1