[gnumeric] Search: fix search for negative number.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Search: fix search for negative number.
- Date: Tue, 26 May 2009 14:20:23 -0400 (EDT)
commit 628144e621174c5cbf2389d159476022567c50d5
Author: Morten Welinder <terra gnome org>
Date: Tue May 26 14:19:58 2009 -0400
Search: fix search for negative number.
---
src/search.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/search.c b/src/search.c
index e83f3ed..c658e84 100644
--- a/src/search.c
+++ b/src/search.c
@@ -59,8 +59,13 @@ check_number (GnmSearchReplace *sr)
if (v) {
gnm_float f = value_get_as_float (v);
- sr->low_number = gnm_sub_epsilon (f);
- sr->high_number = gnm_add_epsilon (f);
+ if (f < 0) {
+ sr->low_number = gnm_add_epsilon (f);
+ sr->high_number = gnm_sub_epsilon (f);
+ } else {
+ sr->low_number = gnm_sub_epsilon (f);
+ sr->high_number = gnm_add_epsilon (f);
+ }
value_release (v);
return TRUE;
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]