Changeset View
Changeset View
Standalone View
Standalone View
src/script/interpreter.cpp
Show First 20 Lines • Show All 1,116 Lines • ▼ Show 20 Lines | try { | ||||
// (in position -- x1 x2) | // (in position -- x1 x2) | ||||
if (stack.size() < 2) { | if (stack.size() < 2) { | ||||
return set_error( | return set_error( | ||||
serror, SCRIPT_ERR_INVALID_STACK_OPERATION); | serror, SCRIPT_ERR_INVALID_STACK_OPERATION); | ||||
} | } | ||||
const valtype &data = stacktop(-2); | const valtype &data = stacktop(-2); | ||||
// Make sure the split point is apropriate. | // Make sure the split point is appropriate. | ||||
uint64_t position = | uint64_t position = | ||||
CScriptNum(stacktop(-1), fRequireMinimal).getint(); | CScriptNum(stacktop(-1), fRequireMinimal).getint(); | ||||
if (position > data.size()) { | if (position > data.size()) { | ||||
return set_error(serror, | return set_error(serror, | ||||
SCRIPT_ERR_INVALID_SPLIT_RANGE); | SCRIPT_ERR_INVALID_SPLIT_RANGE); | ||||
} | } | ||||
// Prepare the results in their own buffer as `data` | // Prepare the results in their own buffer as `data` | ||||
▲ Show 20 Lines • Show All 539 Lines • Show Last 20 Lines |