summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pack.c b/pack.c
index bac34154b7..24032b8729 100644
--- a/pack.c
+++ b/pack.c
@@ -1565,8 +1565,9 @@ pack_unpack(str, fmt)
VALUE str = rb_str_new(0, 0);
memcpy(&t, s, sizeof(char *));
s += sizeof(char *);
- if (t)
- rb_str_cat(str, t, strlen(t));
+ if (t) {
+ rb_str_cat2(str, t);
+ }
rb_ary_push(ary, str);
}
}