If any part of a single consideration for one or more objects, or any one or any part of any one of several considerations for a single object, is unlawful, the agreement is void.
Illustration
A promise to superintend, on behalf of B, a legal manufacture of indigo, and an illegal traffic in other articles. B promises to pay to A salary of 10,000 rupees a year. The agreement is void, the object of A's promise, and the consideration for B's promise, being in part unlawful.