summaryrefslogtreecommitdiff
path: root/error.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
commit395ca33bffc96f0396a2160931f91d15d5ba8af1 (patch)
tree555d859d4b0bcaa7e2056a46e31f8d1aa3df6a06 /error.c
parent5b7e24d744340345c11578911e3f1fa4ab0fb9cc (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/branches/ruby_1_8@8801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 0b63aa0..7dacac8 100644
--- a/error.c
+++ b/error.c
@@ -907,7 +907,7 @@ syserr_initialize(argc, argv, self)
else err = "unknown error";
if (!NIL_P(mesg)) {
VALUE str = mesg;
- size_t len = strlen(err)+RSTRING(str)->len+3;
+ size_t len = strlen(err)+RSTRING(str)->len+4;
StringValue(str);
mesg = rb_str_new(0, len);
snprintf(RSTRING(mesg)->ptr, len, "%s - %.*s", err,