aboutsummaryrefslogtreecommitdiffstats
path: root/pack.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-18 14:57:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-18 14:57:40 +0000
commitc0087df04443e20ccd09cffe22d75774470f6853 (patch)
treea29dbd64e9f6da9c11c6c48c5642b33ac844884f /pack.c
parent68a01f9cdfa90dc0195b472c0ac49c8d6d8dfbad (diff)
downloadruby-c0087df04443e20ccd09cffe22d75774470f6853.tar.gz
pack.c: round down too long uuencode width
* pack.c (pack_pack): round down too long uuencode width. folding width in uuencode format cannot be longer than 63 bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pack.c b/pack.c
index 895d97c770..5b63c3f242 100644
--- a/pack.c
+++ b/pack.c
@@ -927,6 +927,8 @@ pack_pack(VALUE ary, VALUE fmt)
}
if (len <= 2)
len = 45;
+ else if (len > 63 && type == 'u')
+ len = 63;
else
len = len / 3 * 3;
while (plen > 0) {