From a78c25dd480feaa7aa7102f1b1a6e47b56e0975b Mon Sep 17 00:00:00 2001 From: Alex Cherepanov Date: Wed, 8 Nov 2006 16:13:35 +0000 Subject: 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 --- gs/src/idparam.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gs/src/idparam.c') 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). */ -- cgit v1.2.3