summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-18 05:03:00 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-18 05:03:00 (GMT)
commit3e2fdaf1dd76dc39177dce7937897f4dc70e875d (patch)
treed22dcc4d42af52d3c771ef9118cf7f445b5c17dd /pack.c
parent2446c9654753f985f183476e3b46c9660b32c5b2 (diff)
* pack.c (pack_unpack): output characters even if the input doesn't
have paddings. [Bug #8286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pack.c b/pack.c
index fb6472c..0a37d8d 100644
--- a/pack.c
+++ b/pack.c
@@ -2006,9 +2006,9 @@ pack_unpack(VALUE str, VALUE fmt)
*ptr++ = castchar(c << 6 | d);
}
if (a != -1 && b != -1) {
- if (c == -1 && *s == '=')
+ if (c == -1)
*ptr++ = castchar(a << 2 | b >> 4);
- else if (c != -1 && *s == '=') {
+ else {
*ptr++ = castchar(a << 2 | b >> 4);
*ptr++ = castchar(b << 4 | c >> 2);
}