mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-24 05:24:34 +00:00
CNode's nHeaderStart may be negative, so change its type
This commit is contained in:
parent
c3fad8350b
commit
0dd710acb6
@ -117,7 +117,7 @@ public:
|
||||
int64 nLastRecv;
|
||||
int64 nLastSendEmpty;
|
||||
int64 nTimeConnected;
|
||||
unsigned int nHeaderStart;
|
||||
int nHeaderStart;
|
||||
unsigned int nMessageStart;
|
||||
CAddress addr;
|
||||
int nVersion;
|
||||
@ -299,7 +299,7 @@ public:
|
||||
|
||||
void AbortMessage()
|
||||
{
|
||||
if (nHeaderStart == -1)
|
||||
if (nHeaderStart < 0)
|
||||
return;
|
||||
vSend.resize(nHeaderStart);
|
||||
nHeaderStart = -1;
|
||||
@ -319,7 +319,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (nHeaderStart == -1)
|
||||
if (nHeaderStart < 0)
|
||||
return;
|
||||
|
||||
// Set the size
|
||||
@ -344,7 +344,7 @@ public:
|
||||
|
||||
void EndMessageAbortIfEmpty()
|
||||
{
|
||||
if (nHeaderStart == -1)
|
||||
if (nHeaderStart < 0)
|
||||
return;
|
||||
int nSize = vSend.size() - nMessageStart;
|
||||
if (nSize > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user