[gs-cvs] rev 6972 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Sun Aug 6 07:13:41 PDT 2006
Author: alexcher
Date: 2006-08-06 07:13:41 -0700 (Sun, 06 Aug 2006)
New Revision: 6972
Modified:
trunk/gs/src/iutil.c
Log:
Return typecheck rather than invalidaccess when given a literal
array instead of a procedure.
Modified: trunk/gs/src/iutil.c
===================================================================
--- trunk/gs/src/iutil.c 2006-08-06 01:34:32 UTC (rev 6971)
+++ trunk/gs/src/iutil.c 2006-08-06 14:13:41 UTC (rev 6972)
@@ -846,9 +846,17 @@
int
check_proc_failed(const ref * pref)
{
- return (r_is_array(pref) ? e_invalidaccess :
- r_has_type(pref, t__invalid) ? e_stackunderflow :
- e_typecheck);
+ if (r_is_array(pref)) {
+ if (r_has_attr(pref, a_executable))
+ return e_invalidaccess;
+ else
+ return e_typecheck;
+ } else {
+ if (r_has_type(pref, t__invalid))
+ return e_stackunderflow;
+ else
+ return e_typecheck;
+ }
}
/* Compute the error code when a type check on the stack fails. */
More information about the gs-cvs
mailing list