Smith make a contract to sell automatic rifles to a foreign country. Because the sale of such weapons to that country was illegal under an act of Congress, the U.S. government prosecuted Smith for making the contract. He raised the defense that because the contract was illegal, it was void and there is no binding obligation when a contract is void; therefore, no contract for which he could be prosecuted existed. Explain whether he is correct.