summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-03 07:52:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-03 07:52:09 +0000
commit822f1a5a59fda892bb33020c6e3fdcdb25a6a8c0 (patch)
treed82596ada10bebf519d6570c5d723ee25092c936 /ext
parent1fe40b7cc5e92105f636d670d77b059fe4a4c50b (diff)
* 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
Diffstat (limited to 'ext')
-rw-r--r--ext/gdbm/gdbm.c2
1 files changed, 1 insertions, 1 deletions
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;