Index: cfg.py ================================================================== --- cfg.py +++ cfg.py @@ -187,11 +187,11 @@ if score_index_to_replace is None: raise ValueError("No more nodes to fill in") time_remaining = max_time - score_len(score) new_phrase, syncs = choose_phrase(instr, syncs, score_len(score), time_remaining, score) - score = score[:score_index_to_replace-1] + new_phrase + score[score_index_to_replace+1:] + score = score[:score_index_to_replace] + new_phrase + score[score_index_to_replace+1:] except ValueError: return (score, syncs)