]> git.street.me.uk Git - andy/viking.git/commitdiff
Fix potential crashing when using multiple maps on especially 64bit systems.
authorRob Norris <rw_norris@hotmail.com>
Thu, 28 Jun 2012 18:41:59 +0000 (19:41 +0100)
committerRob Norris <rw_norris@hotmail.com>
Thu, 28 Jun 2012 18:41:59 +0000 (19:41 +0100)
Use correct type for returned function call, otherwise it can seemingly corrupt the copyrights list leading to undefined behaviour.

src/vikviewport.c

index ce194c0a5b4ee220bb8609dadc32b0f4c7a5b96f..d20254bf316d7e7e446984b5a039510eef5a8b59 100644 (file)
@@ -1310,7 +1310,7 @@ void vik_viewport_add_copyright ( VikViewport *vp, const gchar *copyright )
   g_return_if_fail ( vp != NULL );
   if ( copyright )
   {
-    gchar *found = (gchar*)g_slist_find_custom ( vp->copyrights, copyright, (GCompareFunc)strcmp );
+    GSList *found = g_slist_find_custom ( vp->copyrights, copyright, (GCompareFunc)strcmp );
     if ( found == NULL )
     {
       gchar *duple = g_strdup ( copyright );