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 d0fdd75cd5..7a04673309 100644
--- a/pack.c
+++ b/pack.c
@@ -494,7 +494,9 @@ pack_pack(ary, 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)) {