diff options
author | Rich Felker <dalias@aerifal.cx> | 2006-10-12 03:12:16 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2006-10-12 03:12:16 +0000 |
commit | 48820ddb03b5a9678b43d7c1a7d1596899bf3404 (patch) | |
tree | 916dceb9b5dc5152f4a3c8c35adaadf67364786c /ucf.c | |
parent | 78d6d73f6b0ab3566d33e44503efbde0ff841fad (diff) |
better logic for attached rules
Diffstat (limited to 'ucf.c')
-rw-r--r-- | ucf.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -90,9 +90,11 @@ int ucf_lookup(struct ucf *f, int idx, const unsigned *cc, } else l = 1; switch (x) { case RULE_ATTACHED_TO: + if (i > idx) i = idx; if (i && c[--i]-a < l) continue; break; case RULE_WITH_ATTACHED: + if (i < idx) i = idx; if (c[++i]-a < l) continue; break; case RULE_FOLLOWS: |