1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
yugui 2008-12-08 14:41:44 +00:00
parent 9e4b940d8d
commit d64e40aeb0
2 changed files with 9 additions and 1 deletions

View file

@ -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.

4
pack.c
View file

@ -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)) {