aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-05-09 10:00:16 -0400
committerGavin Andresen <gavinandresen@gmail.com>2014-05-09 10:00:16 -0400
commitaaab675a78378c8f087639b24feba10f0e25630f (patch)
tree7c9854e83b3ee3aa4706774fc5a9f17c647d2533 /src/test/script_tests.cpp
parent8b542d5874ce4a65994a5020e28484a6510cda7e (diff)
parentd3a33fc869d23fb13c010a6e9995bdf6574a621e (diff)
downloadbitcoin-aaab675a78378c8f087639b24feba10f0e25630f.tar.xz
Merge pull request #3860 from petertodd/test-checkmulti-n-m-zero
Test CHECKMULTISIG with m == 0 and/or n == 0
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r--src/test/script_tests.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 7bc2bfb6dd..29d518d707 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -67,7 +67,11 @@ ParseScript(string s)
BOOST_FOREACH(string w, words)
{
- if (all(w, is_digit()) ||
+ if (w.size() == 0)
+ {
+ // Empty string, ignore. (boost::split given '' will return one word)
+ }
+ else if (all(w, is_digit()) ||
(starts_with(w, "-") && all(string(w.begin()+1, w.end()), is_digit())))
{
// Number