summaryrefslogtreecommitdiffstats
path: root/src/psaux/psconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/psaux/psconv.c')
-rw-r--r--src/psaux/psconv.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c
index 3bbeab6..d824b59 100644
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (body). */
/* */
-/* Copyright 2006 by */
+/* Copyright 2006, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -187,10 +187,18 @@
if ( c < 0 || c >= 10 )
break;
- if ( divider < 10000000L )
+ if ( !integral && power_ten > 0 )
{
+ power_ten--;
decimal = decimal * 10 + c;
- divider *= 10;
+ }
+ else
+ {
+ if ( divider < 10000000L )
+ {
+ decimal = decimal * 10 + c;
+ divider *= 10;
+ }
}
}
}