more work in the lib-mime. begin to "rewr^H^Had" the code in rfc2231.c
[apps/madmutt.git] / rfc2047.c
index d8e4a5d..23fffd4 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -583,9 +583,7 @@ static int rfc2047_decode_word (char *d, const char *s, size_t len)
         for (; pp < pp1; pp++) {
           if (*pp == '_')
             *pd++ = ' ';
-          else if (*pp == '=' &&
-                   (!(pp[1] & ~127) && hexval (pp[1]) != -1) &&
-                   (!(pp[2] & ~127) && hexval (pp[2]) != -1)) {
+          else if (*pp == '=' && hexval(pp[1]) >= 0 && hexval(pp[2]) >= 0) {
             *pd++ = (hexval (pp[1]) << 4) | hexval (pp[2]);
             pp += 2;
           }