about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY3
-rw-r--r--generator/pbmtext.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 69da2785..1180337b 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,6 +6,9 @@ CHANGE HISTORY
 
 not yet  BJH  Release 10.75.00
 
+              pbmtext: Fix bug: invalid memory reference when text contains
+              code points > 127.  Broken in 10.74.
+
               Build: Remove use of strndup so it compiles on Mac OS X 10.6.
               Broken in 10.74.
 
diff --git a/generator/pbmtext.c b/generator/pbmtext.c
index 221f215e..8ae28616 100644
--- a/generator/pbmtext.c
+++ b/generator/pbmtext.c
@@ -579,7 +579,7 @@ insertCharacters(bit **        const bits,
     
         for (cursor = 0; lp.textArray[line][cursor] != '\0'; ++cursor) {
             char const currentChar = lp.textArray[line][cursor];
-            unsigned int const glyphIndex = (unsigned int) currentChar;
+            unsigned int const glyphIndex = (unsigned char) currentChar;
             struct glyph * const glyphP = fontP->glyph[glyphIndex];
             int const toprow = row + fontP->maxheight + fontP->y 
                 - glyphP->height - glyphP->y;