diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | pack.c | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Mon Dec 8 23:34:18 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'. + just ignores '*' in these cases. + [ruby-dev:37289] + Mon Dec 8 18:31:41 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * pack.c (pack_pack): fixed length for odd length string. @@ -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)) { |