Fix a bug in entry_prim_gen.c.