gnumeric r16579 - in branches/gnumeric-1-8: . src



Author: mortenw
Date: Mon May 19 20:46:40 2008
New Revision: 16579
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16579&view=rev

Log:
2008-05-19  Morten Welinder  <terra gnome org>

	* src/expr.c (value_intersection): Handle empty array.  [#533516]
	Fix from Jean.



Modified:
   branches/gnumeric-1-8/ChangeLog
   branches/gnumeric-1-8/NEWS
   branches/gnumeric-1-8/src/expr.c

Modified: branches/gnumeric-1-8/NEWS
==============================================================================
--- branches/gnumeric-1-8/NEWS	(original)
+++ branches/gnumeric-1-8/NEWS	Mon May 19 20:46:40 2008
@@ -4,6 +4,7 @@
 	* Evaluate formulas loaded from a text file. [#525107]
 	* Fix INDEX related crash. [#533247]
 	* Fix LINEST and LOGREG crashes.  [#533263]
+	* Handle empty array.  [#533516]
 
 Jon KÃre:
         * Receive clipboard from broken apps. [#524756]

Modified: branches/gnumeric-1-8/src/expr.c
==============================================================================
--- branches/gnumeric-1-8/src/expr.c	(original)
+++ branches/gnumeric-1-8/src/expr.c	Mon May 19 20:46:40 2008
@@ -645,7 +645,9 @@
 	gboolean found = FALSE;
 
 	if (v->type == VALUE_ARRAY) {
-		res = value_dup (v->v_array.vals[0][0]);
+		res = (v->v_array.x == 0 || v->v_array.y == 0)
+			? value_new_error_VALUE (NULL)
+			: value_dup (v->v_array.vals[0][0]);
 		value_release (v);
 		return res;
 	}



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