From 822f1a5a59fda892bb33020c6e3fdcdb25a6a8c0 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 3 Oct 2001 07:52:09 +0000 Subject: * ext/gdbm/gdbm.c (rb_gdbm_fetch): str is a VALUE now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ ext/gdbm/gdbm.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index acbc02af14..e0751372a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 3 16:49:49 2001 Nobuyoshi Nakada + + * ext/gdbm/gdbm.c (rb_gdbm_fetch): str is a VALUE now. + Wed Oct 3 13:32:06 2001 Yukihiro Matsumoto * marshal.c (r_object): better allocation type check for diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c index 1e76a28ca8..fba4d23866 100644 --- a/ext/gdbm/gdbm.c +++ b/ext/gdbm/gdbm.c @@ -169,7 +169,7 @@ rb_gdbm_fetch(dbm, key) RSTRING(str)->len = val.dsize; RSTRING(str)->orig = 0; RSTRING(str)->ptr = REALLOC_N(val.dptr,char,val.dsize+1); - RSTRING(str)->ptr[str->len] = '\0'; + RSTRING(str)->ptr[val.dsize] = '\0'; OBJ_TAINT(str); return (VALUE)str; -- cgit v1.2.3