From 62d231aeffe3b19c6f9b53e4d50f61c479e536db Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 17 Jun 2011 07:21:46 +0200 Subject: [PATCH] cssparser: Make lines and positions 0-indexed --- gtk/gtkcssparser.c | 2 +- tests/css/parser/test-css-parser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c index e9fe6a4fdb..13d63d4869 100644 --- a/gtk/gtkcssparser.c +++ b/gtk/gtkcssparser.c @@ -61,7 +61,7 @@ _gtk_css_parser_new (const char *data, parser->user_data = user_data; parser->line_start = data; - parser->line = 1; + parser->line = 0; return parser; } diff --git a/tests/css/parser/test-css-parser.c b/tests/css/parser/test-css-parser.c index 6329a20c39..8d4fcd078c 100644 --- a/tests/css/parser/test-css-parser.c +++ b/tests/css/parser/test-css-parser.c @@ -148,7 +148,7 @@ parsing_error_cb (GtkCssProvider *provider, basename = g_path_get_basename (path); g_string_append_printf (errors, "%s:%u: error: ", - basename, line); + basename, line + 1); g_free (basename); if (error->domain == GTK_CSS_PROVIDER_ERROR)