diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-02-14 00:08:27 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-02-14 00:08:27 +0000 |
commit | 7271c7ff35b74b7fa0bb9dd2db95b99fb9f9db01 (patch) | |
tree | a615bf0e4098a3f35baa97fca031efd99c2cfc7d /uint256.h | |
parent | 19765903dc39a641af614443f5876190fe56931d (diff) |
Workaround for bug on wxWidgets 2.9.0 Ubuntu 9.10 64-bit where first character of the hidden columns were displayed so status column had three numbers overprinted. Fixed by adding a leading space to the hidden columns. 64-bit compile with wxWidgets 2.9.0 seems to be fully working normally now.
Diffstat (limited to 'uint256.h')
-rw-r--r-- | uint256.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -299,19 +299,18 @@ public: return string(psz, psz + sizeof(pn)*2);
}
- void SetHex(const std::string& str)
+ void SetHex(const char* psz)
{
for (int i = 0; i < WIDTH; i++)
pn[i] = 0;
- // skip 0x
- const char* psz = str.c_str();
+ // skip leading spaces
while (isspace(*psz))
psz++;
+
+ // skip 0x
if (psz[0] == '0' && tolower(psz[1]) == 'x')
psz += 2;
- while (isspace(*psz))
- psz++;
// hex string to uint
static char phexdigit[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0 };
@@ -332,6 +331,11 @@ public: }
}
+ void SetHex(const std::string& str)
+ {
+ SetHex(str.c_str());
+ }
+
std::string ToString() const
{
return (GetHex());
|