Replace MAX_OPCODE for OP_NOP10.

That OP_NOP10 is the last executable opcode is a bit of a obscure trivia, and the MAX_OPCODE constant already exists. This merely standardizes use of MAX_OPCODE over OP_NOP10 where it makes sense and is more clear.
This commit is contained in:
Mark Friedenbach
2017-07-11 16:37:40 +09:00
parent 21ed30a314
commit c8e29d7ff0
2 changed files with 4 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ CScript ParseScript(const std::string& s)
if (mapOpNames.empty())
{
for (int op = 0; op <= OP_NOP10; op++)
for (int op = 0; op <= MAX_OPCODE; op++)
{
// Allow OP_RESERVED to get into mapOpNames
if (op < OP_NOP && op != OP_RESERVED)