[gnome-maps] main.c: Use the correct argv/argc



commit b5d536553276bdd00536742babf05d4bf382c957
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Fri Aug 22 08:39:05 2014 +0200

    main.c: Use the correct argv/argc
    
    Before this, commandline handling would not work since
    we were removing the program-name from the argv array.
    With this fix, we will be able to use the standard
    GApplication options.
    
    $ gnome-maps --help-gapplication
    $ gnome-maps --gapplication-service
    
    etc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735215

 src/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index cb53558..146e486 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,7 +42,7 @@ main (int argc, char *argv[])
   context = gjs_context_new_with_search_path ((char**) search_path);
 
   if (!gjs_context_define_string_array(context, "ARGV",
-                                       argc - 1, (const char**)argv + 1,
+                                       argc, (const char**)argv,
                                        &error))
     {
       g_critical ("Failed to define ARGV: %s", error->message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]