HomePhabricator

CBigNum: Convert negative int64 values in a more well-defined way
0f5a2a82d93fUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

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

Details

Provenance
Luke Dashjr <luke-jr+git@utopios.org>Authored on Jun 18 2012, 20:35
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGING5849bd472a3a: Fix signed subtraction overflow in CBigNum::setint64().
Branches
Unknown
Tags
Unknown

Event Timeline

Luke Dashjr <luke-jr+git@utopios.org> committed rSTAGING0f5a2a82d93f: CBigNum: Convert negative int64 values in a more well-defined way (authored by Luke Dashjr <luke-jr+git@utopios.org>).Jun 18 2012, 20:37