Psalm 18:23 in the King James Version
I was also upright before him, and I kept myself from mine iniquity.
Context
22 For all his ordinances were before me. I didn’t put away his statutes from me.
23 I was also blameless with him. I kept myself from my iniquity.
24 Therefore the LORD has rewarded me according to my righteousness, according to the cleanness of my hands in his eyesight.