Bugfix. Add 16-bit types.

This commit is contained in:
JoelKatz
2011-11-28 14:02:33 -08:00
parent ebb9a9c255
commit aee1e9f180
2 changed files with 4 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
typedef __int64 int64;
typedef unsigned __int64 uint64;
typedef unsigned int uint32;
typedef unsigned short int uint16;
typedef int int32;
#else
@@ -10,6 +11,7 @@ typedef int int32;
typedef long long int64;
typedef unsigned long long uint64;
typedef unsigned int uint32;
typedef unsigned short int uint16;
typedef int int32;
#endif

View File

@@ -637,14 +637,14 @@ inline const uint256 operator-(const uint256& a, const uint256& b) { return
static uint256 uint160to256(const uint160& u)
{
uint256 m;
memcpy(((char *) &m)+(sizeof(m)-sizeof(u)), &u, sizeof(u));
memcpy(&m, &u, sizeof(u));
return m;
}
static uint160 uint256to160(const uint256& u)
{
uint160 m;
memcpy((char *) &m, &u, sizeof(m));
memcpy(&m, &u, sizeof(m));
return m;
}
@@ -656,8 +656,6 @@ static uint160 uint256to160(const uint256& u)
inline int Testuint256AdHoc(std::vector<std::string> vArg)
{
uint256 g(0);