[gs-cvs] rev 7734 - trunk/gs/src
lpd at ghostscript.com
lpd at ghostscript.com
Fri Feb 23 05:29:38 PST 2007
Author: lpd
Date: 2007-02-23 05:29:37 -0800 (Fri, 23 Feb 2007)
New Revision: 7734
Modified:
trunk/gs/src/ztoken.c
Log:
Changes the 'token' operator so it does not pop the operand on an
invalidaccess error, for Adobe compatibility.
Modified: trunk/gs/src/ztoken.c
===================================================================
--- trunk/gs/src/ztoken.c 2007-02-22 15:39:15 UTC (rev 7733)
+++ trunk/gs/src/ztoken.c 2007-02-23 13:29:37 UTC (rev 7734)
@@ -55,8 +55,12 @@
ref token;
/* -1 is to remove the string operand in case of error. */
int orig_ostack_depth = ref_stack_count(&o_stack) - 1;
- int code = scan_string_token(i_ctx_p, op, &token);
+ int code;
+ /* Don't pop the operand in case of invalidaccess. */
+ if (!r_has_attr(op, a_read))
+ return_error(e_invalidaccess);
+ code = scan_string_token(i_ctx_p, op, &token);
switch (code) {
case scan_EOF: /* no tokens */
make_false(op);
More information about the gs-cvs
mailing list