Fix for 687500, -2147483648.5 causes /undefined in -2147483648.
Alex Cherepanov <[email protected]> Sat, 05 Jun 2004 10:03:00 -0400
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
Fix parsing -2147483648.5, min_int followed by a fractional part. _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
iscannum.c.diff
(text/plain, 667 B)
Index: gs/src/iscannum.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/iscannum.c,v
retrieving revision 1.8
diff -b -u -r1.8 iscannum.c
--- gs/src/iscannum.c 19 Mar 2004 08:30:16 -0000 1.8
+++ gs/src/iscannum.c 5 Jun 2004 13:11:46 -0000
@@ -199,9 +199,13 @@
) {
GET_NEXT(c, sp, c = EOFC);
dval = -(double)min_long;
- if (c == 'e' || c == 'E' || c == '.') {
+ if (c == 'e' || c == 'E') {
exp10 = 0;
goto fs;
+ } else if (c == '.') {
+ GET_NEXT(c, sp, c = EOFC);
+ exp10 = 0;
+ goto fd;
} else if (!IS_DIGIT(d, c)) {
lval = min_long;
break;