diff options
author | Keith Packard <keithp@keithp.com> | 2002-08-31 07:38:35 +0000 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-05-04 18:14:08 -0700 |
commit | def948f052a758850cadc022943517742b299441 (patch) | |
tree | 421ed6440a5dd8fc137c98aa64d3d1224abe8f26 /print_render.c | |
parent | 5a0de81b2922b2f2c174f136b0b5ade2440562a8 (diff) | |
download | xscope-def948f052a758850cadc022943517742b299441.tar.gz |
Fix bugs in CompositeGlyphs decoding
Diffstat (limited to 'print_render.c')
-rw-r--r-- | print_render.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/print_render.c b/print_render.c index 398020f..fa56d17 100644 --- a/print_render.c +++ b/print_render.c @@ -435,14 +435,15 @@ PrintGlyphList(unsigned char *buf, int length, char *name, int size) case 4: break; } - buf += n*size + 8; - length -= n*size+8; + n = ((n * size + 8) + 3) & ~3; + buf += n; + length -= n; } else { - PrintField(buf, 4, 4, GLYPHSET, "glyphset"); - buf += 8; - length -= 8; + PrintField(buf, 8, 4, GLYPHSET, "glyphset"); + buf += 12; + length -= 12; } } } |