diff options
author | infirit <[email protected]> | 2014-12-10 01:20:23 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-10 01:20:23 +0100 |
commit | 3d2385996e32b5a60c8d572e455e171a60d388fa (patch) | |
tree | 4a262bd98c6638ad74a46caef5d61be2e9b42e16 /backend/dvi/mdvi-lib/pk.c | |
parent | 031a264df3a9790b34ea40b3efe7f1191ebaf648 (diff) | |
download | atril-3d2385996e32b5a60c8d572e455e171a60d388fa.tar.bz2 atril-3d2385996e32b5a60c8d572e455e171a60d388fa.tar.xz |
Fix problem with some pk fonts
Taken from evince commit: 0a6e8aabcc46d47b5d84e5414cd0e07d57ef171b
From: José Aliste <[email protected]>
Diffstat (limited to 'backend/dvi/mdvi-lib/pk.c')
-rw-r--r-- | backend/dvi/mdvi-lib/pk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/dvi/mdvi-lib/pk.c b/backend/dvi/mdvi-lib/pk.c index 3e7d9661..1b42a319 100644 --- a/backend/dvi/mdvi-lib/pk.c +++ b/backend/dvi/mdvi-lib/pk.c @@ -328,13 +328,14 @@ static int pk_load_font(DviParams *unused, DviFont *font) { int i; int flag_byte; - int loc, hic, maxch; + int hic, maxch; Int32 checksum; FILE *p; #ifndef NODEBUG char s[256]; #endif long alpha, beta, z; + unsigned int loc; font->chars = xnalloc(DviFontChar, 256); p = font->in; @@ -521,7 +522,7 @@ static int pk_load_font(DviParams *unused, DviFont *font) } /* resize font char data */ - if(loc > 0 && hic < maxch-1) { + if(loc > 0 || hic < maxch-1) { memmove(font->chars, font->chars + loc, (hic - loc + 1) * sizeof(DviFontChar)); font->chars = xresize(font->chars, |