[goffice] Fix SI formatting for tiny numbers



commit ae9e29e8a0951851663021953a4999bf3183b52d
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Fri Sep 2 00:39:10 2011 -0600

    Fix SI formatting for tiny numbers
    
    2011-09-02  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* goffice/utils/go-format.c (si_reduction): use -24 for smaller
    	exponents

 ChangeLog                 |    5 +++++
 goffice/utils/go-format.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3788519..12fd3ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-02  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* goffice/utils/go-format.c (si_reduction): use -24 for smaller
+	exponents
+
 2011-09-01  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/canvas/goc-text.c (goc_text_prepare_draw): always initialize
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index d845ecb..b10bd30 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -2756,7 +2756,7 @@ si_reduction (int exponent, char const **si)
 	};
 	guint i;
 	
-	for (i = 0; i < G_N_ELEMENTS (si_prefixes); i++)
+	for (i = 0; i < G_N_ELEMENTS (si_prefixes) - 1; i++)
 		if (si_prefixes[i].power <= exponent)
 			break;
 	



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