[BACK]Return to display.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / top

Diff for /src/usr.bin/top/display.c between version 1.21 and 1.22

version 1.21, 2005/06/17 12:12:28 version 1.22, 2005/07/01 19:33:35
Line 138 
Line 138 
                 display_width = MAX_COLS - 1;                  display_width = MAX_COLS - 1;
   
         /* now, allocate space for the screen buffer */          /* now, allocate space for the screen buffer */
         screenbuf = malloc(display_lines * display_width);          screenbuf = malloc(display_lines * display_width + 1);
         if (screenbuf == NULL)          if (screenbuf == NULL)
                 return (-1);                  return (-1);
   
Line 675 
Line 675 
   
         /* truncate the line to conform to our current screen width */          /* truncate the line to conform to our current screen width */
         linebuf[display_width] = '\0';          linebuf[display_width] = '\0';
           bufferline[display_width] = '\0';
   
         /* is line higher than we went on the last display? */          /* is line higher than we went on the last display? */
         if (linenum >= last_hi) {          if (linenum >= last_hi) {

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22