From f8d1cc25aaadb5558f3cd00e7dd8e6b48490adab 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: http://svn.ruby-lang.org/repos/ruby/trunk@1765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/gdbm/gdbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') 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; -- cgit