summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-08 14:41:44 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-08 14:41:44 +0000
commitd64e40aeb0014bf0b46ff3049bb274b12448fae1 (patch)
tree393bc471e798ac4cea159f722597bf4f34383dc1 /pack.c
parent9e4b940d8d9a6b878737e1666ea9284b2d38030f (diff)
* pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.
just ignores '*' in these cases. [ruby-dev:37289] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 a53d4b14bb..5af4c44760 100644
--- a/pack.c
+++ b/pack.c
@@ -493,7 +493,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)) {