Sanhedrin 79 - Aiming at One, but Killing Another

If one intended to kill an animal but killed a man instead, he is not liable, since he lacked the intent to kill a man. If one intended to kill an idolater but killed a Jew instead, he cannot be executed by a Jewish court. While it is certainly forbidden to kill any human being, this matter is outside of the jurisdiction of Sanhedrin. If one intended to kill a premature, nonviable baby, but killed a viable one instead, he is not liable to execution, because the warning given to him would have been uncertain.

If he intended to strike an adult with a blow not sufficient to kill an adult, but it landed on a child instead, and it was sufficient to kill a child, and the child died, he is not liable, because he did not intend to commit murder, and any warning would be uncertain.

If he intended to kill an adult, but it landed on a child instead, and the child died, the killer is liable to execution.

Art: Frank Duveneck - The Cobbler's Apprentice