aboutsummaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
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 50e50d01a6..ebc431107b 100644
--- a/error.c
+++ b/error.c
@@ -956,7 +956,7 @@ syserr_initialize(argc, argv, self)
if (!NIL_P(mesg)) {
VALUE str = mesg;
StringValue(str);
- mesg = rb_str_new(0, strlen(err)+RSTRING(mesg)->len+3);
+ mesg = rb_str_new(0, strlen(err)+RSTRING(str)->len+3);
sprintf(RSTRING(mesg)->ptr, "%s - %.*s", err,
(int)RSTRING(str)->len, RSTRING(str)->ptr);
rb_str_resize(mesg, strlen(RSTRING(mesg)->ptr));