]> git.street.me.uk Git - andy/viking.git/blobdiff - src/clipboard.c
Fix memory leak on re-downloading 'bad' map image tiles.
[andy/viking.git] / src / clipboard.c
index 61c7c8528b91fa73ca4158ad524077de7c9f0a70..64471379ace52b98e3d11de84d22294c54253516 100644 (file)
@@ -163,6 +163,10 @@ static gboolean clip_parse_latlon ( const gchar *text, struct LatLon *coord )
         s[i+2] = ' ';
       }
     }
+    if ( g_ascii_iscntrl (s[i]) ) {
+      // Replace any control characters (i.e. mainly for tabs) with a space
+      s[i] = ' ';
+    }
   }
 
   /* now try reading coordinates */