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

alexcher at ghostscript.com alexcher at ghostscript.com
Tue Aug 1 18:14:35 PDT 2006


Author: alexcher
Date: 2006-08-01 18:14:35 -0700 (Tue, 01 Aug 2006)
New Revision: 6946

Modified:
   trunk/gs/src/zstring.c
Log:
Make string operator error reprorting similar to Distiller's.


Modified: trunk/gs/src/zstring.c
===================================================================
--- trunk/gs/src/zstring.c	2006-08-02 00:47:25 UTC (rev 6945)
+++ trunk/gs/src/zstring.c	2006-08-02 01:14:35 UTC (rev 6946)
@@ -51,7 +51,11 @@
     byte *sbody;
     uint size;
 
-    check_int_leu(*op, max_string_size);
+    check_type(*op, t_integer);
+    if (op->value.intval < 0 ) 
+        return_error(e_rangecheck);
+    if (op->value.intval > max_string_size ) 
+        return_error(e_limitcheck); /* to match Distiller */
     size = op->value.intval;
     sbody = ialloc_string(size, "string");
     if (sbody == 0)



More information about the gs-cvs mailing list