diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-03 07:52:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-03 07:52:09 +0000 |
commit | f8d1cc25aaadb5558f3cd00e7dd8e6b48490adab (patch) | |
tree | d82596ada10bebf519d6570c5d723ee25092c936 | |
parent | 3b37a6847edb2da6225d9785a4579e0cb603dab1 (diff) | |
download | ruby-f8d1cc25aaadb5558f3cd00e7dd8e6b48490adab.tar.gz ruby-f8d1cc25aaadb5558f3cd00e7dd8e6b48490adab.tar.xz ruby-f8d1cc25aaadb5558f3cd00e7dd8e6b48490adab.zip |
* ext/gdbm/gdbm.c (rb_gdbm_fetch): str is a VALUE now.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/gdbm/gdbm.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Wed Oct 3 16:49:49 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp> + + * ext/gdbm/gdbm.c (rb_gdbm_fetch): str is a VALUE now. + Wed Oct 3 13:32:06 2001 Yukihiro Matsumoto <matz@ruby-lang.org> * marshal.c (r_object): better allocation type check for diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c index 1e76a28ca..fba4d2386 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; |