]> www.fi.muni.cz Git - evince.git/blobdiff - backend/dvi/mdvi-lib/pk.c
Fix problem with some pk fonts.
[evince.git] / backend / dvi / mdvi-lib / pk.c
index 08377e634b151b64dcb427911c6a9ce9b8d4345a..a91161348fe803d175e22820deacafb076884ac2 100644 (file)
@@ -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,