summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack.c b/pack.c
index 8d0a70473b..718f977d35 100644
--- a/pack.c
+++ b/pack.c
@@ -901,7 +901,7 @@ pack_pack(VALUE ary, VALUE fmt)
ptr = RSTRING_PTR(from);
plen = RSTRING_LEN(from);
- if (len == 0) {
+ if (len == 0 && type == 'm') {
encodes(res, ptr, plen, type, 0);
ptr += plen;
break;