We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6992e0d commit e4aa1f7Copy full SHA for e4aa1f7
src/core_read.cpp
@@ -50,15 +50,14 @@ CScript ParseScript(const std::string& s)
50
51
for (std::vector<std::string>::const_iterator w = words.begin(); w != words.end(); ++w)
52
{
53
+ int64_t n;
54
if (w->empty())
55
56
// Empty string, ignore. (boost::split given '' will return one word)
57
}
- else if (std::all_of(w->begin(), w->end(), ::IsDigit) ||
58
- (w->front() == '-' && w->size() > 1 && std::all_of(w->begin()+1, w->end(), ::IsDigit)))
+ else if (ParseInt64(*w, &n))
59
60
// Number
61
- int64_t n = atoi64(*w);
62
result << n;
63
64
else if (w->substr(0,2) == "0x" && w->size() > 2 && IsHex(std::string(w->begin()+2, w->end())))
0 commit comments