2007-01-05 [colin] 2.6.1cvs108
[claws.git] / src / common / quoted-printable.c
index 4293f4b6ea6a0974d2a174ff099d3780f509c887..bf3cc89b8e344e1aa06d9fffdaa02a522215aac3 100644 (file)
@@ -90,9 +90,10 @@ gint qp_decode_line(gchar *str)
 
        while (*inp != '\0') {
                if (*inp == '=') {
-                       if (inp[1] && inp[2] && inp[1] == '0' && inp[2] == '0')
+                       if (inp[1] && inp[2] && inp[1] == '0' && inp[2] == '0') {
                                inp += 3;
-                       else if (inp[1] && inp[2] &&
+                               continue;
+                       } else if (inp[1] && inp[2] &&
                            get_hex_value((guchar *)outp, inp[1], inp[2])
                            == TRUE) {
                                inp += 3;
@@ -121,9 +122,10 @@ gint qp_decode_const(gchar *out, gint avail, const gchar *str)
 
        while (*inp != '\0' && avail > 0) {
                if (*inp == '=') {
-                       if (inp[1] && inp[2] && inp[1] == '0' && inp[2] == '0')
+                       if (inp[1] && inp[2] && inp[1] == '0' && inp[2] == '0') {
                                inp += 3;
-                       else if (inp[1] && inp[2] &&
+                               continue;
+                       } else if (inp[1] && inp[2] &&
                            get_hex_value((guchar *)outp, inp[1], inp[2])
                            == TRUE) {
                                inp += 3;
@@ -156,9 +158,10 @@ gint qp_decode_q_encoding(guchar *out, const gchar *in, gint inlen)
 
        while (inp - in < inlen && *inp != '\0') {
                if (*inp == '=' && inp + 3 - in <= inlen) {
-                       if (inp[1] == '0' && inp[2] == '0')
+                       if (inp[1] && inp[2] && inp[1] == '0' && inp[2] == '0') {
                                inp += 3;
-                       else if (get_hex_value(outp, inp[1], inp[2]) == TRUE) {
+                               continue;
+                       } else if (get_hex_value(outp, inp[1], inp[2]) == TRUE) {
                                inp += 3;
                        } else {
                                *outp = *inp++;