Is it bad to publish a scientific paper with wrong results?
Publishing things that you know are erroneous is a good way to get a really bad scientific reputation. Depending on how severe it is, it might go so far as to be labelled fraud and formally sanctioned, basically killing your career.

If it's important, then yes, you need to fix it.

If it's not published yet, then fix it before you publish it.  If it's published, then you will need to submit a correction or possibly even a retraction.  Good scientists do this, and it's much better to acknowledge your errors and retract than to have others expose you as a liar.