Browse Source

Merge pull request #459 from jgarzik/char-msgstart

Use 'unsigned char' rather than 'char' for pchMessageStart.
0.8
Gavin Andresen 13 years ago
parent
commit
c648b589be
  1. 2
      src/main.cpp
  2. 2
      src/net.h

2
src/main.cpp

@ -1775,7 +1775,7 @@ bool static AlreadyHave(CTxDB& txdb, const CInv& inv) @@ -1775,7 +1775,7 @@ bool static AlreadyHave(CTxDB& txdb, const CInv& inv)
// The message start string is designed to be unlikely to occur in normal data.
// The characters are rarely used upper ascii, not valid as UTF-8, and produce
// a large 4-byte int at any alignment.
char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };
unsigned char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };
bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)

2
src/net.h

@ -67,7 +67,7 @@ bool StopNode(); @@ -67,7 +67,7 @@ bool StopNode();
// (4) size
// (4) checksum
extern char pchMessageStart[4];
extern unsigned char pchMessageStart[4];
class CMessageHeader
{

Loading…
Cancel
Save