Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon4.gif   width of the textarea is too large (after reply), posted by Heiko Scheit on Mon Aug 4 14:02:52 2003 
    icon2.gif   Re: width of the textarea is too large (after reply), posted by Stefan Ritt on Fri Sep 5 17:17:03 2003 
Message ID: 421     Entry time: Mon Aug 4 14:02:52 2003     Reply to this: 426
Icon: Warning  Author: Heiko Scheit  Author Email: h.scheit@mpi-hd.mpg.de 
Category: Bug fix  OS: Linux  ELOG Version: 2.3.9. 
Subject: width of the textarea is too large (after reply) 
The width of the textarea after pressing reply is too large. 
The problem is that the algorithm that searches for the longes line
looks for the next '\r' which it does not find and therefore takes the
number of characters in the text to be the width of the longest line.
To search for '\n' instead should solve the problem.  Please find the 
diff output below.


$ diff -c elogd.c elogd.c~
*** elogd.c     Mon Aug  4 13:57:35 2003
--- elogd.c~    Fri Aug  1 13:13:09 2003
***************
*** 6028,6035 ****
      p = text;
      do
        {
!       /*      pend = strchr(p, '\r'); */
!       pend = strchr(p, '\n');
        if (pend == NULL)
          pend = p+strlen(p);
  
--- 6028,6034 ----
      p = text;
      do
        {
!       pend = strchr(p, '\r');
        if (pend == NULL)
          pend = p+strlen(p);
  
ELOG V3.1.5-fe60aaf