[gs-cvs] rev 7441 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Sun Dec 3 07:52:20 PST 2006
Author: alexcher
Date: 2006-12-03 07:52:19 -0800 (Sun, 03 Dec 2006)
New Revision: 7441
Modified:
trunk/gs/src/gxhintn.c
Log:
Avoid floating point division by 0. Catch the case when all components
of the matrix equal to 0.
DIFFERENCES:
None
Modified: trunk/gs/src/gxhintn.c
===================================================================
--- trunk/gs/src/gxhintn.c 2006-12-03 15:52:07 UTC (rev 7440)
+++ trunk/gs/src/gxhintn.c 2006-12-03 15:52:19 UTC (rev 7441)
@@ -209,7 +209,7 @@
private inline int double_matrix__invert_to(const double_matrix * this, double_matrix * m)
{ double det = this->xx * this->yy - this->xy * this->yx;
- if (fabs(det) * 1000000 < fabs(this->xx) + fabs(this->xy) + fabs(this->yx) + fabs(this->yy))
+ if (fabs(det) * 1000000 <= fabs(this->xx) + fabs(this->xy) + fabs(this->yx) + fabs(this->yy))
return_error(gs_error_rangecheck);
m->xx = this->yy / det;
m->xy = -this->xy / det;
More information about the gs-cvs
mailing list