diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-08-09 10:31:23 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-08-09 10:31:23 +0000 |
commit | e890df6dcc6e4f636e4183ff984b57deb8f26d14 (patch) | |
tree | 14b623aed7783950ae3545097347c683c37137a1 /Build/source/texk/web2c/omegafonts/ligkern_routines.c | |
parent | 83ce83099932cd306181cae5ac417de1d5a54902 (diff) |
texk/web2c/omegafonts: Fixed a bug in checking for infinite ligature loops
git-svn-id: svn://tug.org/texlive/trunk@34883 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/omegafonts/ligkern_routines.c')
-rw-r--r-- | Build/source/texk/web2c/omegafonts/ligkern_routines.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/omegafonts/ligkern_routines.c b/Build/source/texk/web2c/omegafonts/ligkern_routines.c index 6da01bf8dcf..6ae730c4024 100644 --- a/Build/source/texk/web2c/omegafonts/ligkern_routines.c +++ b/Build/source/texk/web2c/omegafonts/ligkern_routines.c @@ -110,7 +110,7 @@ void set_skip_command(unsigned val) { if (lk_step_ended == TRUE) { - if (val>128) { + if (val>127) { warning_0("Maximum SKIP amount is 127; ignored"); } else { lig_kern_table[nl-1].entries[0] = val; @@ -382,11 +382,10 @@ l_hash_lookup(unsigned x, unsigned y) unsigned key = (x & 0x7fff)*(y & 0x7fff) % PRIME; hash_list L = hash_table[key]; - if (L==NULL) return NULL; - while (L->x < x) L = L->ptr; - if (L->x != x) return NULL; - while ((L->x == x) && (L->y < y)) L = L->ptr; - if (L->y != y) return NULL; + while ((L != NULL) && ((x > L->x) || ((x == L->x) && (y > L->y)))) + L = L->ptr; + if ((L == NULL) || (x < L->x) || ((x == L->x) && (y < L->y))) + return NULL; return L; } |