diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dl/dl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c index 5813adc58b..f11b69c5a5 100644 --- a/ext/dl/dl.c +++ b/ext/dl/dl.c @@ -588,7 +588,7 @@ VALUE rb_dl_strdup(VALUE self, VALUE str) { SafeStringValue(str); - return rb_dlptr_new(strdup(RSTRING(str)->ptr), RSTRING(str)->len, dlfree); + return rb_dlptr_new(strdup(RSTRING(str)->ptr), strlen(RSTRING(str)->ptr)+1, dlfree); } static VALUE |