Bhagavad Gita, Chapter 4, Verse 17
For verily, the true nature even of action, enjoined by the Shâstras, should be known, as also that of forbidden action, and of inaction: the nature of Karma is impenetrable.
There are really three categories here, not just two, and the lines between them aren't as obvious as they look.
Krishna sets up a real distinction before diving in: doing the right thing, doing the wrong thing, and doing nothing at all are each their own category, not just opposite ends of one simple scale.