[gnumeric] sstest: fix function docs test.



commit e981b137dd6d37912e7a2a6d67847634f48a24f3
Author: Morten Welinder <terra gnome org>
Date:   Wed Sep 1 14:55:32 2010 -0400

    sstest: fix function docs test.

 ChangeLog  |    3 ++-
 NEWS       |    1 +
 src/func.c |    6 +++---
 3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b25939d..859840c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-09-01  Morten Welinder  <terra gnome org>
 
-	* src/func.c (check_argument_refs): Plug leak.
+	* src/func.c (check_argument_refs): Plug leak.  Fix the actual
+	test.
 
 2010-08-31  Morten Welinder  <terra gnome org>
 
diff --git a/NEWS b/NEWS
index f10a2d0..ab85b14 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ Morten:
 	* Fix some confusion of char vs. xmlChar.
 	* Fix elapsed-time entry.  [#628082]
 	* Fix problems with limits for date axes.
+	* Improve function docs self test.
 
 --------------------------------------------------------------------------
 Gnumeric 1.10.9
diff --git a/src/func.c b/src/func.c
index 800ee2a..2fd5041 100644
--- a/src/func.c
+++ b/src/func.c
@@ -544,17 +544,17 @@ check_argument_refs (const char *text, GnmFunc const *fd)
 			return FALSE;
 		if (at[1] != '{')
 			return TRUE;
-		text = strchr (at + 1, '}');
+		text = strchr (at + 2, '}');
 		if (!text)
 			return FALSE;
-		argname = g_strndup (at + 1, text - at - 1);
+		argname = g_strndup (at + 2, text - at - 2);
 
 		for (i = 0; TRUE; i++) {
 			char *thisarg = function_def_get_arg_name (fd, i);
 			gboolean found;
 			if (!thisarg) {
 				g_free (argname);
-				return FALSE;
+				return TRUE;
 			}
 			found = strcmp (argname, thisarg) == 0;
 			g_free (thisarg);



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