use stdlib atof() instead of gnu99 strtof() + more sense making example binds for...
[uzbl-mobile] / uzbl.c
diff --git a/uzbl.c b/uzbl.c
index c53e255..1564192 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -545,6 +545,7 @@ load_start_cb (WebKitWebView* page, WebKitWebFrame* frame, gpointer data) {
     (void) page;
     (void) frame;
     (void) data;
+    uzbl.gui.sbar.load_progress = 0;
     g_string_truncate(uzbl.state.keycmd, 0); // don't need old commands to remain on new page?
     if (uzbl.behave.load_start_handler)
         run_handler(uzbl.behave.load_start_handler, "");
@@ -735,7 +736,7 @@ load_uri (WebKitWebView *web_view, GArray *argv) {
             run_js(web_view, argv);
             return;
         }
-        if (g_strrstr (argv_idx(argv, 0), "://") == NULL)
+        if (g_strrstr (argv_idx(argv, 0), "://") == NULL && g_strstr_len (argv_idx(argv, 0), 5, "data:") == NULL)
             g_string_prepend (newuri, "http://");
         /* if we do handle cookies, ask our handler for them */
         webkit_web_view_load_uri (web_view, newuri->str);
@@ -1557,7 +1558,7 @@ set_var_value(gchar *name, gchar *val) {
         } else if (c->type == TYPE_FLOAT) {
             float *fp = (float *)c->ptr;
             buf = expand_vars(val);
-            *fp = strtof(buf, &endp);
+            *fp = atof(buf);
             g_free(buf);
         }