summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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). */