aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2012-07-02 16:29:14 +0200
committerMatt Corallo <[email protected]>2012-07-02 16:29:14 +0200
commit467b79391fd92d3af4893a702454e5d4b401263a (patch)
tree2b8a266cee29f353d356dfc5960127c50256a32c /src/script.h
parentMerge pull request #1545 from TheBlueMatt/diffsendbuffer (diff)
downloaddiscoin-467b79391fd92d3af4893a702454e5d4b401263a.tar.xz
discoin-467b79391fd92d3af4893a702454e5d4b401263a.zip
Fix signed/unsigned warnings in {script,serialize}.h (fixes #1541)
Diffstat (limited to 'src/script.h')
-rw-r--r--src/script.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script.h b/src/script.h
index d490cd182..e2b83bd6e 100644
--- a/src/script.h
+++ b/src/script.h
@@ -452,7 +452,7 @@ public:
memcpy(&nSize, &pc[0], 4);
pc += 4;
}
- if (end() - pc < nSize)
+ if (end() - pc < 0 || (unsigned int)(end() - pc) < nSize)
return false;
if (pvchRet)
pvchRet->assign(pc, pc + nSize);