bitcoin/bitcoin — pull request #1689 by gavinandresen (2012-08-20 18:14:21+00:00)
Title: When using SIGHASH_SINGLE, do not sign inputs that have no corresponding outputs

This fixes issue #1688