bitcoin/bitcoin — pull request #2120 by gavinandresen (2012-12-20 23:57:51+00:00)
Title: Fix off-by-one error: change outputs were never last

Found by Hal Finney (thanks Hal!): change outputs were never
inserted as the last output, so were not randomized at all
for single-output transactions (they were always the first output).
Fixes issue #2107