Changeset 2435 for neercs


Ignore:
Timestamp:
Jun 15, 2008, 8:40:22 PM (12 years ago)
Author:
Pascal Terjan
Message:
  • No need to close the fd just before calling destroy_screen
  • Don't skip one element when we are looping through the list and remove one
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/screens.c

    r2434 r2435  
    337337
    338338            if(nr == 0 || errno != EWOULDBLOCK) {
    339                 close(screen_list->screen[i]->fd);
    340                 screen_list->screen[i]->fd = -1;
    341339                destroy_screen(screen_list->screen[i]);
    342340                remove_screen(screen_list, i, 0);
     
    348346                }
    349347                if(i < (screen_list->pty)) (screen_list->pty)--;
     348                /* Don't skip the element which is now at position i */
     349                i--;
    350350                refresh = 1;
    351351            }
Note: See TracChangeset for help on using the changeset viewer.