[gjs] gjs_parse_args: Make args 1-based



commit 6f501506171c15c454d78e77dd849befd7f76411
Author: Colin Walters <walters verbum org>
Date:   Tue Aug 11 18:19:03 2009 -0400

    gjs_parse_args: Make args 1-based
    
    Change the error messages to be 1-based which is how
    most other error messages work.

 gjs/jsapi-util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gjs/jsapi-util.c b/gjs/jsapi-util.c
index 483d836..80449e8 100644
--- a/gjs/jsapi-util.c
+++ b/gjs/jsapi-util.c
@@ -1163,7 +1163,7 @@ gjs_parse_args (JSContext  *context,
         
         if (arg_error_message != NULL) {
             gjs_throw(context, "Error invoking %s, at argument %d (%s): %s", function_name, 
-                      i, argname, arg_error_message);
+                      i+1, argname, arg_error_message);
             g_clear_error (&arg_error);
             goto error_unwind;
         }



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