diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-19 14:59:01 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-19 14:59:01 +0000 |
| commit | acdf52b56e35257177df4224d423934ce5d01ac1 (patch) | |
| tree | a7f32971a56115906044c3d295d5124b9b0f9c25 /eval.c | |
| parent | 5dc2c3c889933b8a426c658f3792849f0b4b98a8 (diff) | |
| download | ruby-acdf52b56e35257177df4224d423934ce5d01ac1.tar.gz ruby-acdf52b56e35257177df4224d423934ce5d01ac1.tar.xz ruby-acdf52b56e35257177df4224d423934ce5d01ac1.zip | |
* error.c (syserr_initialize): add 1 byte for snprintf() size for
NUL at the end. [ruby-dev:26574]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8510,13 +8510,13 @@ proc_to_s(self) if ((node = data->frame.node) || (node = data->body)) { len += strlen(node->nd_file) + 2 + (SIZEOF_LONG*CHAR_BIT-NODE_LSHIFT)/3; str = rb_str_new(0, len); - snprintf(RSTRING(str)->ptr, len, + snprintf(RSTRING(str)->ptr, len+1, "#<%s:0x%.*lx@%s:%d>", cname, w, (VALUE)data->body, node->nd_file, nd_line(node)); } else { str = rb_str_new(0, len); - snprintf(RSTRING(str)->ptr, len, + snprintf(RSTRING(str)->ptr, len+1, "#<%s:0x%.*lx>", cname, w, (VALUE)data->body); } RSTRING(str)->len = strlen(RSTRING(str)->ptr); |
