aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/script.cpp b/src/script.cpp
index eb8200bcc3..660023ef48 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -536,7 +536,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
return false;
int n = CastToBigNum(stacktop(-1)).getint();
popstack(stack);
- if (n < 0 || n >= stack.size())
+ if (n < 0 || n >= (int)stack.size())
return false;
valtype vch = stacktop(-n-1);
if (opcode == OP_ROLL)
@@ -604,9 +604,9 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
int nEnd = nBegin + CastToBigNum(stacktop(-1)).getint();
if (nBegin < 0 || nEnd < nBegin)
return false;
- if (nBegin > vch.size())
+ if (nBegin > (int)vch.size())
nBegin = vch.size();
- if (nEnd > vch.size())
+ if (nEnd > (int)vch.size())
nEnd = vch.size();
vch.erase(vch.begin() + nEnd, vch.end());
vch.erase(vch.begin(), vch.begin() + nBegin);
@@ -625,7 +625,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
int nSize = CastToBigNum(stacktop(-1)).getint();
if (nSize < 0)
return false;
- if (nSize > vch.size())
+ if (nSize > (int)vch.size())
nSize = vch.size();
if (opcode == OP_LEFT)
vch.erase(vch.begin() + nSize, vch.end());