Fix SMS Concatenation header parsing
authorDenis Kenzior <denkenz@gmail.com>
Sun, 14 Jun 2009 05:20:06 +0000 (00:20 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Sun, 14 Jun 2009 07:02:16 +0000 (02:02 -0500)
src/smsutil.c

index 275c695..20654cc 100644 (file)
@@ -1814,7 +1814,7 @@ gboolean sms_extract_concatenation(const struct sms *sms, guint16 *ref_num,
                        if (concat_hdr[1] == 0)
                                break;
 
-                       if (concat_hdr[2] == 0 || concat_hdr[1] > concat_hdr[2])
+                       if (concat_hdr[2] == 0 || concat_hdr[2] > concat_hdr[1])
                                break;
 
                        rn = concat_hdr[0];
@@ -1833,7 +1833,7 @@ gboolean sms_extract_concatenation(const struct sms *sms, guint16 *ref_num,
                                break;
 
                        if (concat_hdr[3] == 0 ||
-                                       concat_hdr[2] > concat_hdr[3])
+                                       concat_hdr[3] > concat_hdr[2])
                                break;
 
                        rn = (concat_hdr[0] << 8) | concat_hdr[1];