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 | c4319e678f693d5fbc49bd357ded1c8f951476e9 (patch) | |
tree | a615bf0e4098a3f35baa97fca031efd99c2cfc7d /uint256.h | |
parent | c85dfb148a1e3d75773bc5f6b7cad14363fd666b (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.
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@62 1a98c847-1fd6-4fd8-948a-caf3550aa51b
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());
|