Make compiler happy
authorDenis Kenzior <denkenz@gmail.com>
Mon, 22 Jun 2009 17:45:18 +0000 (12:45 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Mon, 22 Jun 2009 18:22:14 +0000 (13:22 -0500)
src/smsutil.c

index beb11b4..3825f32 100644 (file)
@@ -2239,9 +2239,13 @@ GSList *sms_text_prepare(const char *utf8, guint16 ref,
        /* UDHI, UDL, UD and DCS actually depend on what we have in the text */
        gsm_encoded = convert_utf8_to_gsm(utf8, -1, NULL, &written, 0);
 
-       if (!gsm_encoded)
+       if (!gsm_encoded) {
+               gsize converted;
+
                ucs2_encoded = g_convert(utf8, -1, "UCS-2BE//TRANSLIT", "UTF-8",
-                                               NULL, &written, NULL);
+                                               NULL, &converted, NULL);
+               written = converted;
+       }
 
        if (!gsm_encoded && !ucs2_encoded)
                return NULL;