[PATCH] bug with subtract in gnumeric



I think I found a problem in gnumeric.

A cell with '=a-b' is evaluated as 'b-a'

The attached patch fixes the problem.

Thanks, 

Ian
? gnumeric.spec
? gnumeric.diff
? doc/Makefile
? doc/C/Makefile
? doc/C/func-list.sgml
? doc/C/func-index.sgml
? doc/C/gnumeric.html
? doc/C/gnumeric
? doc/C/gnumeric.junk
? doc/es/Makefile
? plugins/ff-csv/Makefile
? plugins/ff-csv/.deps
? plugins/ff-csv/.libs
? plugins/ff-csv/csv-io.lo
? plugins/ff-csv/libcsv.la
? plugins/text/Makefile.in
? plugins/text/Makefile
? plugins/text/.deps
? plugins/text/.libs
? plugins/text/text-io.lo
? plugins/text/libtext.la
Index: src/expr.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/expr.c,v
retrieving revision 1.50
diff -u -r1.50 expr.c
--- src/expr.c	1999/03/26 23:14:20	1.50
+++ src/expr.c	1999/03/27 20:50:27
@@ -838,10 +838,7 @@
 				int sum;
 
 				if (tree->oper == OPER_SUB){
-					int t = ia;
-					
-					ia = ib;
-					ib = -t;
+				        ib = -ib;
 				}
 
 				sum = ia + ib;


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