diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-12-25 20:40:38 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-12-25 20:40:38 +0000 |
commit | ca4e5d91a96387bc270692f520b5a30c09856c16 (patch) | |
tree | 3b90d98f59c6d2e48c68aa07c4768d5a3642b0b1 /lib/libpbm2.c | |
parent | e8724e9798d00fac3326f03ff9fdd616bdc8fce6 (diff) | |
download | netpbm-mirror-ca4e5d91a96387bc270692f520b5a30c09856c16.tar.gz netpbm-mirror-ca4e5d91a96387bc270692f520b5a30c09856c16.tar.xz netpbm-mirror-ca4e5d91a96387bc270692f520b5a30c09856c16.zip |
Update Advanced series to 10.69
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2351 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libpbm2.c')
-rw-r--r-- | lib/libpbm2.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libpbm2.c b/lib/libpbm2.c index a8e4b0f6..a77fa0ae 100644 --- a/lib/libpbm2.c +++ b/lib/libpbm2.c @@ -87,10 +87,13 @@ pbm_readpbminit(FILE * const ifP, int * const rowsP, int * const formatP) { - *formatP = pm_readmagicnumber(ifP); + int realFormat; - switch (PAM_FORMAT_TYPE(*formatP)) { + realFormat = pm_readmagicnumber(ifP); + + switch (PAM_FORMAT_TYPE(realFormat)) { case PBM_TYPE: + *formatP = realFormat; pbm_readpbminitrest(ifP, colsP, rowsP); break; @@ -110,7 +113,8 @@ pbm_readpbminit(FILE * const ifP, "to PBM with 'pamtopnm'"); break; default: - pm_error("bad magic number - not a Netpbm file"); + pm_error("bad magic number 0x%x - not a PPM, PGM, PBM, or PAM file", + realFormat); } validateComputableSize(*colsP, *rowsP); } |