Index: src/cr-tknzr.c
===================================================================
RCS file: /cvs/gnome/libcroco/src/cr-tknzr.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 cr-tknzr.c
--- src/cr-tknzr.c	29 May 2004 23:37:27 -0000	1.23
+++ src/cr-tknzr.c	2 Mar 2006 00:58:30 -0000
@@ -1489,7 +1489,8 @@ cr_tknzr_parse_num (CRTknzr * a_this, 
         guint32 cur_char = 0,
                 int_part = 0,
                 dec_part = 0,
-                next_char = 0;
+                next_char = 0,
+                decimal_places = 0;
         CRInputPos init_pos;
         CRParsingLocation location = {0} ;
 
@@ -1534,6 +1535,7 @@ cr_tknzr_parse_num (CRTknzr * a_this, 
                         if (parsing_dec == FALSE) {
                                 int_part = int_part * 10 + (cur_char - '0');
                         } else {
+                                decimal_places++;
                                 dec_part = dec_part * 10 + (cur_char - '0');
                         }
                 } else {
@@ -1552,7 +1554,7 @@ cr_tknzr_parse_num (CRTknzr * a_this, 
                 gdouble val = 0.0;
 
                 val = int_part;
-                val += cr_utils_n_to_0_dot_n (dec_part);
+                val += cr_utils_n_to_0_dot_n (dec_part, decimal_places);
                 if (*a_num == NULL) {
                         *a_num = cr_num_new_with_val (val, val_type);
 
Index: src/cr-utils.c
===================================================================
RCS file: /cvs/gnome/libcroco/src/cr-utils.c,v
retrieving revision 1.13
diff -u -p -u -r1.13 cr-utils.c
--- src/cr-utils.c	18 Apr 2004 15:26:47 -0000	1.13
+++ src/cr-utils.c	2 Mar 2006 00:58:31 -0000
@@ -1293,12 +1293,13 @@ cr_utils_dump_n_chars2 (guchar a_char, G
 }
 
 gdouble
-cr_utils_n_to_0_dot_n (glong a_n)
+cr_utils_n_to_0_dot_n (glong a_n, glong decimal_places)
 {
         gdouble result = a_n;
 
-        while (ABS (result) > 1) {
+        while (decimal_places > 0) {
                 result = result / 10;
+                decimal_places--;
         }
 
         return result;
Index: src/cr-utils.h
===================================================================
RCS file: /cvs/gnome/libcroco/src/cr-utils.h,v
retrieving revision 1.13
diff -u -p -u -r1.13 cr-utils.h
--- src/cr-utils.h	18 Apr 2004 15:26:47 -0000	1.13
+++ src/cr-utils.h	2 Mar 2006 00:58:31 -0000
@@ -236,7 +236,7 @@ cr_utils_dump_n_chars2 (guchar a_char, 
                         GString *a_string,
                         glong a_nb) ;
 gdouble
-cr_utils_n_to_0_dot_n (glong a_n) ;
+cr_utils_n_to_0_dot_n (glong a_n, glong decimal_places) ;
 
 GList *
 cr_utils_dup_glist_of_string (GList *a_list) ;
