Chapter 9 · The Royal Secret · Krishna said
Bhagavad Gita 9.30 — Devotion transforms
अपि चेत्सुदुराचारो भजते मामनन्यभाक्। साधुरेव स मन्तव्यः सम्यग्व्यवसितो हि सः ॥
api cetsudurācāro bhajate māmananyabhāk | sādhureva sa mantavyaḥ samyagvyavasito hi saḥ ||
Meaning
Even if a person of very bad conduct worships me with undivided devotion, he should be regarded as good, for he has made the right resolve.