diff options
author | Kevin Ryde <user42@zip.com.au> | 2006-04-17 00:05:42 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2006-04-17 00:05:42 +0000 |
commit | 2b829bbb3d685ff780a0e3c0888d1d1231e2bc0e (patch) | |
tree | 2fa96f40db1d02c513fa3002eb4819335cd194dd /libguile/strings.c | |
parent | cd5fea8dbe4879f2d79aeef72f7385728db39d75 (diff) | |
download | guile-2b829bbb3d685ff780a0e3c0888d1d1231e2bc0e.tar.gz |
merge from 1.8 branch
Diffstat (limited to 'libguile/strings.c')
-rw-r--r-- | libguile/strings.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libguile/strings.c b/libguile/strings.c index 49a92542d..1f3094dc6 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -122,12 +122,12 @@ make_stringbuf (size_t len) } } -/* Return a new stringbuf whose underlying storage consists of the LEN octets - pointed to by STR. */ +/* Return a new stringbuf whose underlying storage consists of the LEN+1 + octets pointed to by STR (the last octet is zero). */ SCM_C_INLINE SCM scm_i_take_stringbufn (char *str, size_t len) { - scm_gc_register_collectable_memory (str, len, "stringbuf"); + scm_gc_register_collectable_memory (str, len + 1, "stringbuf"); return scm_double_cell (STRINGBUF_TAG, (scm_t_bits) str, (scm_t_bits) len, (scm_t_bits) 0); |