repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 190a59bd73c39ec77042303956395e7f0c1e6e77:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 190a59bd73c39ec77042303956395e7f0c1e6e77
Author: Marc Lehmann 
Date:   Tue Jan 17 16:06:48 2006 +0000

    *** empty log message ***

diff --git a/src/ptytty.C b/src/ptytty.C
index bfe3ae4c15b5a5617b62906845cad651486c7ae9..
index ..acdac2f023bb6e941958a79710f77ceaefb29a8f 100644
--- a/src/ptytty.C
+++ b/src/ptytty.C
@@ -549,10 +549,10 @@ void serve ()
         {
           rxvt_ptytty **pty = find (ptys.begin (), ptys.end (), cmd.id);

-          if (*pty)
+          if (pty)
             {
-              ptys.erase (pty);
               delete *pty;
+              ptys.erase (pty);
             }
         }
       else
@@ -592,7 +592,7 @@ void rxvt_ptytty_server ()
       sock_fd = sv[1];

       for (int fd = 0; fd < 1023; fd++)
-        if (fd != sock_fd)
+        if (fd != sock_fd && fd != 1)
           close (fd);

       serve ();
diff --git a/src/rxvtutil.h b/src/rxvtutil.h
index 8b6e7dab25a0e61d38171b6e7888e8b21a2c5547..
index ..a16a4b286b43cf540d33c426c426ebcb3ed81ff1 100644
--- a/src/rxvtutil.h
+++ b/src/rxvtutil.h
@@ -258,14 +258,14 @@ public:
     void erase (iterator first, iterator last)
     {
         if (last != first) {
-            memmove (first, last, (end ()-last)*sizeof (T));
+            memmove (first, last, (end () - last) * sizeof (T));
             _last -= last - first;
         }
     }
     void erase (iterator pos)
     {
         if (pos != end ()) {
-            memmove (pos, pos+1, (end ()- (pos+1))*sizeof (T));
+            memmove (pos, pos+1, (end () - (pos+1)) * sizeof (T));
             --_last;
         }
     }

-----END OF PAGE-----