copy with too big character indicies in getCharName.
authorkramm <kramm>
Mon, 19 Nov 2001 15:36:12 +0000 (15:36 +0000)
committerkramm <kramm>
Mon, 19 Nov 2001 15:36:12 +0000 (15:36 +0000)
pdf2swf/xpdf/FontEncoding.h

index 7c81153..10e6fce 100644 (file)
@@ -43,7 +43,7 @@ public:
   void addChar(int code, char *name);
 
   // Return the character name associated with <code>.
-  char *getCharName(int code) { return encoding[code]; }
+  char *getCharName(int code) { return code>=size?0:encoding[code]; }
 
   // Return the code associated with <name>.
   int getCharCode(char *name);