It would seem to me that in this particular case you should have edited the answer to improve it. From http://stackoverflow.com/help/privileges/edit,

> **When should I edit posts?**
> 
> Any time you feel you can make the post better, and are inclined to do so. Editing is encouraged!
> 
> Some common reasons to edit are:
> 
> - to fix grammatical or spelling mistakes
> - to clarify the meaning of a post without changing it
> - to correct minor mistakes or add addendums / updates as the post ages
> - to add related resources or hyperlinks
> 
> Try to make the post substantively better when you edit, not just change a single character. Tiny, trivial edits are discouraged.