diff options
author | Dan Kalowsky <kalowsky@php.net> | 2002-08-14 20:55:11 +0000 |
---|---|---|
committer | Dan Kalowsky <kalowsky@php.net> | 2002-08-14 20:55:11 +0000 |
commit | c55d024c2934fb7b7827d46e35f76223c781774f (patch) | |
tree | 64b200b91adc2d4d23d061c3904818b2475896b1 /ext/imap/php_imap.c | |
parent | 161e2799814fcfacecd2e2e4af1fe55ace76c5b7 (diff) | |
download | php-git-c55d024c2934fb7b7827d46e35f76223c781774f.tar.gz |
Comming a fix for a compile error found in Bug #15630
# NOTE this is NOT the supplied patch in said bug for fixing imap_utf7_decode
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index ede672437f..0298e3e2be 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2049,6 +2049,7 @@ PHP_FUNCTION(imap_utf7_decode) zval **arg; const unsigned char *in, *inp, *endp; unsigned char *out, *outp; + unsigned char c; int inlen, outlen; enum { ST_NORMAL, /* printable text */ @@ -2150,13 +2151,15 @@ PHP_FUNCTION(imap_utf7_decode) break; case ST_DECODE1: outp[1] = UNB64(*inp); - *outp++ |= outp[1] >> 4; + c = outp[1] >> 4; + *outp++ |= c; *outp <<= 4; state = ST_DECODE2; break; case ST_DECODE2: outp[1] = UNB64(*inp); - *outp++ |= outp[1] >> 2; + c = outp[1] >> 2; + *outp++ |= c; *outp <<= 6; state = ST_DECODE3; break; @@ -2190,6 +2193,7 @@ PHP_FUNCTION(imap_utf7_encode) zval **arg; const unsigned char *in, *inp, *endp; unsigned char *out, *outp; + unsigned char c; int inlen, outlen; enum { ST_NORMAL, /* printable text */ @@ -2273,12 +2277,14 @@ PHP_FUNCTION(imap_utf7_encode) state = ST_ENCODE1; break; case ST_ENCODE1: - *outp++ = B64(*outp | *inp >> 4); + c = B64(*outp | *inp >> 4); + *outp++ = c; *outp = *inp++ << 2; state = ST_ENCODE2; break; case ST_ENCODE2: - *outp++ = B64(*outp | *inp >> 6); + c = B64(*outp | *inp >> 6); + *outp++ = c; *outp++ = B64(*inp++); state = ST_ENCODE0; case ST_NORMAL: |