summaryrefslogtreecommitdiff
path: root/gs/src/idparam.c
diff options
context:
space:
mode:
authorAlex Cherepanov <alex.cherepanov@artifex.com>2006-11-08 16:13:35 +0000
committerAlex Cherepanov <alex.cherepanov@artifex.com>2006-11-08 16:13:35 +0000
commita78c25dd480feaa7aa7102f1b1a6e47b56e0975b (patch)
tree8f33c862173a447c96403d5ef1375678e0a21d51 /gs/src/idparam.c
parentcaca45be19e03176071ae7e99605db7b6207b0d5 (diff)
Make UniqueID error reporting match Adobe's. Partial fix for 13-05.PS.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@7178 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/idparam.c')
-rw-r--r--gs/src/idparam.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gs/src/idparam.c b/gs/src/idparam.c
index 40a6e980a..63a4e685a 100644
--- a/gs/src/idparam.c
+++ b/gs/src/idparam.c
@@ -376,11 +376,10 @@ dict_uid_param(const ref * pdict, gs_uid * puid, int defaultval,
uid_set_invalid(puid);
return defaultval;
} else {
- if (!r_has_type(puniqueid, t_integer) ||
- puniqueid->value.intval < 0 ||
- puniqueid->value.intval > 0xffffffL
- )
- return_error(e_rangecheck);
+ if (!r_has_type(puniqueid, t_integer))
+ return_error(e_typecheck);
+ if (puniqueid->value.intval < 0 || puniqueid->value.intval > 0xffffffL)
+ return_error(e_rangecheck);
/* Apparently fonts created by Fontographer often have */
/* a UniqueID of 0, contrary to Adobe's specifications. */
/* Treat 0 as equivalent to -1 (no UniqueID). */