about summary refs log tree commit diff
path: root/lib/pbmfont.h
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-06-12 22:13:39 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-06-12 22:13:39 +0000
commita226462ead908102945bdbd612289c82c89ead5c (patch)
tree54e0eb041f1523168507371f776c62f34ddf9708 /lib/pbmfont.h
parentbe1ba93b7e2877073b61f75b29a3170f7c862384 (diff)
downloadnetpbm-mirror-a226462ead908102945bdbd612289c82c89ead5c.tar.gz
netpbm-mirror-a226462ead908102945bdbd612289c82c89ead5c.tar.xz
netpbm-mirror-a226462ead908102945bdbd612289c82c89ead5c.zip
Fix crash with a glyph that has a negative left or bottom border
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1238 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/pbmfont.h')
-rw-r--r--lib/pbmfont.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pbmfont.h b/lib/pbmfont.h
index d287bc6c..a977a11f 100644
--- a/lib/pbmfont.h
+++ b/lib/pbmfont.h
@@ -16,15 +16,17 @@ struct glyph {
     unsigned int width;
     unsigned int height;
         /* The dimensions of the central glyph, i.e. the 'bmap' array */
-    unsigned int x;
+    int x;
         /* Width in pixels of the white left border of this glyph.
            This can actually be negative to indicate that the central
            glyph backs up over the previous character in the line.  In
            that case, if there is no previous character in the line, it
            is as if 'x' is 0.
         */
-    unsigned int y;
-        /* Height in pixels of the white bottom border of this glyph */
+    int y;
+        /* Height in pixels of the white bottom border of this glyph.
+           Can be negative.
+        */
     unsigned int xadd;
         /* Width of glyph -- white left border plus central glyph
            plus white right border