Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv24374/src

Modified Files:
        charset.c 
Log Message:

Fixed a possible crash (spotted by Jorg.) Also got rid of some unneeded 
casts. 


Index: charset.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/charset.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- charset.c   25 Jun 2006 05:56:39 -0000      1.28
+++ charset.c   25 Jun 2006 06:36:28 -0000      1.29
@@ -360,7 +360,7 @@
        }
     }
     
-    result = charset_to_charset ((gchar *)charset, "UTF-8", str);
+    result = charset_to_charset (charset, "UTF-8", str);
     g_free(charset);
     return result;
 }
@@ -386,7 +386,7 @@
        charset = g_strdup(locale_charset);
     }
 
-    result = charset_to_charset ("UTF-8", (gchar *)charset, str);
+    result = charset_to_charset ("UTF-8", charset, str);
     g_free(charset);
     return result;
 }
@@ -410,8 +410,10 @@
     etd = s->userdata;
 
     if (etd->charset && strlen (etd->charset))
-          charset = etd->charset;
-    else   charset = prefs_get_string("charset");
+          charset = g_strdup(etd->charset);
+    else   
+       charset = prefs_get_string("charset");
+   
     if (!charset || !strlen (charset))
     {    /* use standard locale charset */
        g_free(charset);
@@ -419,7 +421,7 @@
        charset = g_strdup(locale_charset);
     }
 
-    result = charset_to_charset ("UTF-8", (gchar *)charset, str);
+    result = charset_to_charset ("UTF-8", charset, str);
     g_free(charset);
     return result;
 }


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to