]> git.eshelyaron.com Git - emacs.git/commitdiff
(term_init): Fix previous change
authorKenichi Handa <handa@m17n.org>
Thu, 21 Aug 2003 11:36:40 +0000 (11:36 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 21 Aug 2003 11:36:40 +0000 (11:36 +0000)
src/ChangeLog
src/term.c

index 07963de9e1b38465298e004c91b38a623e57798c..fc8ce43d766b7884fc40f653a16e251dadd01c77 100644 (file)
@@ -1,3 +1,8 @@
+2003-08-21  Kenichi Handa  <handa@m17n.org>
+
+       * term.c (term_init): Fix previous change; don't rely on the
+       length of `buffer' if TERMINFO is defined.
+
 2003-08-20  Dave Love  <fx@gnu.org>
 
        * atimer.h: Include lisp.h.
index 506fc16ffb3bbd230937fe74fb7a687c42c4a472..bae059ea4398babc8e7c923b4fa9e97dbd8ca37a 100644 (file)
@@ -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);