Drafting errors sometimes occur in legislation. Usually these errors are minor, such as incorrect punctuation or capitalization, and the meaning is unaffected. But sometimes the matter is more substantive.
Commonly, the error will have something to do with cross-referencing of statutes. For instance, the U.S. statutes pertaining to probation had a drafting error which caused the section about revocation of probation for failing to submit to a drug test to incorrectly reference a section about domestic violence. By clerical error, the law also omitted an accurate reference to community confinement. However, in both cases, courts upheld Congressional intent.
Sometimes courts refuse to apply legislative intent that conflicts with the text of the law, as in the case of the Virginia General Assembly accidentally repealing the exemptions of almost all industries from the statute requiring employers to allow employees not to work on Sabbath. It was necessary for the legislature to re-assemble for a special session to correct the error.
There have been instances, most commonly involving ballot initiatives, in which the drafting error was known prior to enactment. For instance, in the case of Proposition 165, a California welfare reform initiative, Governor Pete Wilson announced that his public campaign statements would let the courts know that a provision eliminating the legislature's power to override a veto was an "unintended error," and the mistake would be corrected, if necessary, by the courts.