Use 'unsigned char' rather than 'char' for pchMessageStart.

Regarding https://bitcointalk.org/index.php?topic=28022.0

main.cpp has: "char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };"
Per discussion on the thread linked, leaving the signedness of
pchMessageStart is unsafe for values > 0x80. This patch specifies
'unsigned char' in main.cpp and net.h.

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
Venkatesh Srinivas
2011-08-07 12:19:14 -04:00
committed by Jeff Garzik
parent eb20f3c8f5
commit 25133bd74b
2 changed files with 2 additions and 2 deletions

View File

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