[automaton] loop all the way through 9, whoops #2225

pull/2236/head
nick black 3 years ago
parent c5cf67e5f1
commit f3c18b3279
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -232,7 +232,7 @@ get_phi_node(automaton* a, esctrie* e){
return NULL;
}
targ->ntype = NODE_NUMERIC;
for(int i = '0' ; i < '9' ; ++i){
for(int i = '0' ; i <= '9' ; ++i){
targ->trie[i] = esctrie_idx(a, targ);
}
}
@ -517,7 +517,8 @@ int walk_automaton(automaton* a, struct inputctx* ictx, unsigned candidate,
return 1;
}
}
loginfo("unexpected transition %u\n", candidate);
loginfo("unexpected transition on %u[%u]\n",
esctrie_idx(a, e), candidate);
return -1;
}
e = esctrie_from_idx(a, a->state);

Loading…
Cancel
Save