chiark / gitweb /
bres: Use mdup to duplicate file descriptors for the child.
[mLib] / atom.c
diff --git a/atom.c b/atom.c
index 0d74478a962cc6ad9e7c4e06c289641a9f37980c..b11fb3946733bc8090750d7a13830514888aea82 100644 (file)
--- a/atom.c
+++ b/atom.c
@@ -1,13 +1,13 @@
 /* -*-c-*-
  *
- * $Id: atom.c,v 1.5 2004/04/08 01:36:11 mdw Exp $
+ * $Id$
  *
  * Atom management
  *
  * (c) 2000 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of the mLib utilities library.
  *
  * it under the terms of the GNU Library General Public License as
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
- * 
+ *
  * mLib is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Library General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Library General Public
  * License along with mLib; if not, write to the Free
  * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
@@ -153,7 +153,7 @@ atom *atom_gensym(atom_table *t)
   a = x_alloc(t->t.t.a, sizeof(atom) + sz);
   a->b.name = (char *)(a + 1);
   memcpy(a->b.name, buf, sz);
-  a->b.len = sz;
+  a->b.len = sz - 1;
   a->b.b.hash = UNIHASH(&unihash_global, buf, sz);
   a->f = ATOMF_GENSYM;
   a->b.b.next = t->g;