chiark / gitweb /
buf: Fix two embarassing bugs found while writing Lisp bindings.
[mLib] / atom.c
diff --git a/atom.c b/atom.c
index 0d74478a962cc6ad9e7c4e06c289641a9f37980c..ce8295c131c2fdb3f92fdc32c8b99f49f411ccf4 100644 (file)
--- a/atom.c
+++ b/atom.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: atom.c,v 1.5 2004/04/08 01:36:11 mdw Exp $
+ * $Id$
  *
  * Atom management
  *
@@ -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;