# HG changeset patch # User Jason Rumney # Date 1207310874 0 # Node ID 96c69ebb9cfa2c2d34f6207f7fc47e1daa768980 # Parent f606935ea4bed9f262f869c6964cc547a9e9f5a7 (uniscribe_check_otf): Rearrange loop for counting features. diff -r f606935ea4be -r 96c69ebb9cfa src/w32uniscribe.c --- a/src/w32uniscribe.c Fri Apr 04 11:59:09 2008 +0000 +++ b/src/w32uniscribe.c Fri Apr 04 12:07:54 2008 +0000 @@ -612,7 +612,6 @@ unsigned short script_table, langsys_table, n_langs; unsigned short feature_index, n_features; DWORD tbl = feature_tables[i]; - Lisp_Object feature; /* Skip if no features requested from this table. */ if (NILP (features[i])) @@ -680,10 +679,9 @@ /* Check the features. Features may contain nil according to documentation in font_prop_validate_otf, so count them. */ n_match_features = 0; - rest = features[i]; - for (feature = XCAR (rest); CONSP (rest); feature = CAR_SAFE (rest)) + for (rest = features[i]; CONSP (rest); rest = XCDR (rest)) { - rest = XCDR (rest); + Lisp_Object feature = XCAR (rest); if (!NILP (feature)) n_match_features++; }