patch-dfasyn_compdfa_c 444 B

12345678910111213
  1. $OpenBSD: patch-dfasyn_compdfa_c,v 1.1 2009/04/24 14:43:16 kurt Exp $
  2. --- dfasyn/compdfa.c.orig Sun Apr 19 09:57:26 2009
  3. +++ dfasyn/compdfa.c Sun Apr 19 09:56:53 2009
  4. @@ -425,7 +425,7 @@ do_next_dfa_state:
  5. for (j=0; j<ntokens; j++) {
  6. int next_state = dfas[i]->map[j];
  7. - if (leads_to_result[next_state] == 0) {
  8. + if ((next_state >= 0) && leads_to_result[next_state] == 0) {
  9. dfas[i]->map[j] = -1;
  10. }
  11. }