git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
f949449
)
Remove MSVC warning - memcpy uses size_t variable
190/head
author
svost
<ya.nowa@yandex.ru>
Tue, 31 Mar 2015 10:29:41 +0000 (13:29 +0300)
committer
svost
<ya.nowa@yandex.ru>
Tue, 31 Mar 2015 10:29:41 +0000 (13:29 +0300)
src/serialize.h
patch
|
blob
|
history
diff --git
a/src/serialize.h
b/src/serialize.h
index
f579c58
..
a1f8a0e
100644
(file)
--- a/
src/serialize.h
+++ b/
src/serialize.h
@@
-1360,9
+1360,9
@@
public:
unsigned int pos = (unsigned int)(nReadPos % vchBuf.size());
size_t nNow = nSize;
if (nNow + pos > vchBuf.size())
- nNow = vchBuf.size() - pos;
+ nNow = (size_t)(vchBuf.size() - pos);
if (nNow + nReadPos > nSrcPos)
- nNow = nSrcPos - nReadPos;
+ nNow = (size_t)(nSrcPos - nReadPos);
memcpy(pch, &vchBuf[pos], nNow);
nReadPos += nNow;
pch += nNow;