[gs-cvs] rev 7493 - trunk/gs/src

lpd at ghostscript.com lpd at ghostscript.com
Mon Dec 11 18:43:41 PST 2006


Author: lpd
Date: 2006-12-11 18:43:40 -0800 (Mon, 11 Dec 2006)
New Revision: 7493

Modified:
   trunk/gs/src/zfrsd.c
Log:
Fixes bug: the ReusableStreamDecode filter treated Intent values other than
0..3 as errors, rather than as equivalent to 0. PS3 CET 23-12V-1


Modified: trunk/gs/src/zfrsd.c
===================================================================
--- trunk/gs/src/zfrsd.c	2006-12-11 20:28:37 UTC (rev 7492)
+++ trunk/gs/src/zfrsd.c	2006-12-12 02:43:40 UTC (rev 7493)
@@ -43,7 +43,7 @@
     os_ptr op = osp;
     ref *pFilter;
     ref *pDecodeParms;
-    int Intent;
+    int Intent = 0;
     bool AsyncRead;
     ref empty_array, filter1_array, parms1_array;
     uint i;
@@ -89,8 +89,10 @@
 		return_error(e_typecheck);
 	}
     }
-    if ((code = dict_int_param(op, "Intent", 0, 3, 0, &Intent)) < 0 ||
-	(code = dict_bool_param(op, "AsyncRead", false, &AsyncRead)) < 0
+    code = dict_int_param(op, "Intent", 0, 3, 0, &Intent);
+    if (code < 0 && code != e_rangecheck) /* out-of-range int is ok, use 0 */
+	return code;
+    if ((code = dict_bool_param(op, "AsyncRead", false, &AsyncRead)) < 0
 	)
 	return code;
     push(1);



More information about the gs-cvs mailing list