bitcoin/bitcoin — pull request #1497 by luke-jr (2012-06-21 22:30:20+00:00)
Title: CBigNum: Convert negative int64 values in a more well-defined way

Since the minimum signed integer cannot be represented as positive so long as its type is signed, and it's not well-defined what happens if you make it unsigned before negating it, we instead increment the negative integer by 1, convert it, then increment the (now positive) unsigned integer by 1 to compensate

@wizeman recently introduced this potential-bug in #1298, so I'd appreciate if he could comment (did not get a response on IRC)