summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-19 13:52:42 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-19 13:52:42 +0000
commit30434d40782ebe046b41b722b1d010324549a1a5 (patch)
tree85cad8ae41d67cd7289de1893943f7ad0aaa5f8e /eval.c
parent20316027872b9a3a70babc884f838f499f1e5746 (diff)
* error.c (syserr_initialize): need to allocate an additional byte
for NUL at the end. [ruby-dev:26574] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index eb5ea2758c..1824790956 100644
--- a/eval.c
+++ b/eval.c
@@ -8667,7 +8667,7 @@ proc_to_s(self)
NODE *node;
char *cname = rb_obj_classname(self);
const int w = (SIZEOF_LONG * CHAR_BIT) / 4;
- long len = strlen(cname)+6+w; /* 6:tags 16:addr */
+ long len = strlen(cname)+6+w+1; /* 6:tags 16:addr NUL */
VALUE str;
Data_Get_Struct(self, struct BLOCK, data);