Answer: In the sentence, “She had intended to say 'wishfully', not 'wistfully',” the comma is used to set off a parenthetical expression.
Step-by-step explanation: A parenthetical expression is a word or phrase added to a sentence without changing the meaning of the independent clause. A parenthetical expression is separated from the main sentence by either commas, round brackets, or long dashes.
In the sentence, it would have been fine to only state, "She had intended to say 'wishfully'." but the parenthetical expression was added for more information.