mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #8808: Do not shadow variables (gcc set)
ad1ae7aCheck and enable -Wshadow by default. (Pavel Janík)9de90bbDo not shadow variables (gcc set) (Pavel Janík) Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8
This commit is contained in:
@@ -186,18 +186,18 @@ unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const
|
||||
// get the last item that the scriptSig
|
||||
// pushes onto the stack:
|
||||
const_iterator pc = scriptSig.begin();
|
||||
vector<unsigned char> data;
|
||||
vector<unsigned char> vData;
|
||||
while (pc < scriptSig.end())
|
||||
{
|
||||
opcodetype opcode;
|
||||
if (!scriptSig.GetOp(pc, opcode, data))
|
||||
if (!scriptSig.GetOp(pc, opcode, vData))
|
||||
return 0;
|
||||
if (opcode > OP_16)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// ... and return its opcount:
|
||||
CScript subscript(data.begin(), data.end());
|
||||
CScript subscript(vData.begin(), vData.end());
|
||||
return subscript.GetSigOpCount(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user