summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pack.c b/pack.c
index f353d67c87..d910546a54 100644
--- a/pack.c
+++ b/pack.c
@@ -491,7 +491,9 @@ pack_pack(VALUE ary, VALUE fmt)
}
}
if (*p == '*') { /* set data length */
- len = strchr("@Xxu", type) ? 0 : items;
+ len = strchr("@Xxu", type) ? 0
+ : strchr("PMm", type) ? 1
+ : items;
p++;
}
else if (ISDIGIT(*p)) {