diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-06-13 00:06:30 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-06-13 00:06:30 +0000 |
commit | fc6409a3f3d5b911d51a3b3964e53ae19fb5edfd (patch) | |
tree | 296efce34d93b87ac334cf1ed2f68d3e93ec5da4 | |
parent | a9a6757efae8aaa648c30bec19601e8c59772e80 (diff) | |
download | netpbm-mirror-fc6409a3f3d5b911d51a3b3964e53ae19fb5edfd.tar.gz netpbm-mirror-fc6409a3f3d5b911d51a3b3964e53ae19fb5edfd.tar.xz netpbm-mirror-fc6409a3f3d5b911d51a3b3964e53ae19fb5edfd.zip |
deal with unprintable character from font file in message
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1241 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | lib/libpbmfont.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libpbmfont.c b/lib/libpbmfont.c index c5d9a616..c2753e20 100644 --- a/lib/libpbmfont.c +++ b/lib/libpbmfont.c @@ -16,6 +16,7 @@ #include <assert.h> #include <string.h> +#include <ctype.h> #include "pm_c_util.h" #include "mallocvar.h" @@ -1205,8 +1206,11 @@ parseBitmapRow(const char * const hex, else if (hdig >= 'A' && hdig <= 'F') hdigValue = 10 + (hdig - 'A'); else - asprintfN(errorP, "Invalid hex digit '%c' in bitmap data '%s'", - hdig, hex); + asprintfN(errorP, + "Invalid hex digit x%02x (%c) in bitmap data '%s'", + (unsigned int)(unsigned char)hdig, + isprint(hdig) ? hdig : '.', + hex); if (!*errorP) { if (i > 0) |