Two wrongs don't make a right
dos eroɾes no aθen un aθjeɾto
In Spanish Dos errores no hacen un acierto.
This idiom is widely understood and used in Spanish-speaking cultures.
Example
"No deberías haberle mentido a tu jefe. Dos errores no hacen un acierto."