mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 01:32:31 +01:00
Fix script test handling of empty scripts
Previously an empty script would evaluate to OP_0
This commit is contained in:
@@ -63,7 +63,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
|
||||
|
||||
Reference in New Issue
Block a user