aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-25 00:05:37 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-25 00:05:37 +0000
commit401926283a200994ecd7df8eae8ced8e0b067c46 (patch)
tree4b3e85c5afc7886f1d1461bee0d075db4daaec6f /util.h
parent2201a0808ea240617a66823f98dda3433d2546b0 (diff)
downloadbitcoin-401926283a200994ecd7df8eae8ced8e0b067c46.tar.xz
alert system
-- version 0.3.11 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@142 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'util.h')
-rw-r--r--util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/util.h b/util.h
index f61896f40b..ba941bf46f 100644
--- a/util.h
+++ b/util.h
@@ -143,7 +143,7 @@ extern char pszSetDataDir[MAX_PATH];
extern bool fShutdown;
extern bool fDaemon;
extern bool fCommandLine;
-extern string strWarning;
+extern string strMiscWarning;
void RandAddSeed();
void RandAddSeedPerfmon();
@@ -307,6 +307,8 @@ inline int64 abs64(int64 n)
template<typename T>
string HexStr(const T itbegin, const T itend, bool fSpaces=true)
{
+ if (itbegin == itend)
+ return "";
const unsigned char* pbegin = (const unsigned char*)&itbegin[0];
const unsigned char* pend = pbegin + (itend - itbegin) * sizeof(itbegin[0]);
string str;
@@ -323,6 +325,8 @@ inline string HexStr(vector<unsigned char> vch, bool fSpaces=true)
template<typename T>
string HexNumStr(const T itbegin, const T itend, bool f0x=true)
{
+ if (itbegin == itend)
+ return "";
const unsigned char* pbegin = (const unsigned char*)&itbegin[0];
const unsigned char* pend = pbegin + (itend - itbegin) * sizeof(itbegin[0]);
string str = (f0x ? "0x" : "");