diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-19 08:26:33 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-19 08:26:33 +0000 |
commit | 8d81fc6df66ab4d839ceaf94f274da36b7fab295 (patch) | |
tree | e316707fad8091ba491bc7f5855c641955b45d96 /pack.c | |
parent | fe9c4e615b69d06db554cf1116560b353b96a9ed (diff) |
merge revision(s) 20580:
* pack.c (pack_pack): fixed length for odd length string.
[ruby-dev:37283]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -610,7 +610,7 @@ pack_pack(ary, fmt) long i, j = 0; if (len > plen) { - j = (len - plen + 1)/2; + j = (len + 1) / 2 - (plen + 1) / 2; len = plen; } for (i=0; i++ < len; ptr++) { @@ -641,7 +641,7 @@ pack_pack(ary, fmt) long i, j = 0; if (len > plen) { - j = (len - plen + 1)/2; + j = (len + 1) / 2 - (plen + 1) / 2; len = plen; } for (i=0; i++ < len; ptr++) { |