aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-09-29 09:36:26 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-09-29 09:36:54 +0200
commit41150d601df8bbbec9e6f0b7fb4d3fc569692522 (patch)
tree9ceddf9231e185e263548d43ee6eab92139076a3 /src
parent76182e7cb62caa93ef24aa657b2b18921f6fc0b7 (diff)
parent93e24dddf3b7063a157b414c07e08ac7f31eaf03 (diff)
downloadbitcoin-41150d601df8bbbec9e6f0b7fb4d3fc569692522.tar.xz
Merge pull request #4970
93e24dd travis: use debug for one build (Cory Fields) be6d87a script: don't read past the end (Cory Fields) a94496f tests: don't split an empty string (Cory Fields) 00522cd depends: disable reduced exports for debug builds (Cory Fields) 1f7fff2 depends: add docs for debug (Cory Fields) dc66ff5 depends: make LDFLAGS act like the other flags (Cory Fields) b1efba8 depends: give miniupnpc cppflags (Cory Fields) 1d154db depends: teach qt to honor debug/release (Cory Fields) 3b63df5 depends: boost: build for debug or release as requested (Cory Fields) 7e99df7 depends: make sure openssl sees cppflags (Cory Fields) f397304 depends: add debug/release flags for linux/osx/win (Cory Fields) 2027ad3 depends: add the debug/release concept to depends (Cory Fields)
Diffstat (limited to 'src')
-rw-r--r--src/script/interpreter.cpp3
-rw-r--r--src/test/getarg_tests.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index d742fb9eb9..a71f55dd26 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -839,7 +839,8 @@ public:
itBegin = it;
}
}
- s.write((char*)&itBegin[0], it-itBegin);
+ if (itBegin != scriptCode.end())
+ s.write((char*)&itBegin[0], it-itBegin);
}
/** Serialize an input of txTo */
diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
index 8cadcdd716..8a984304f4 100644
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -16,7 +16,8 @@ BOOST_AUTO_TEST_SUITE(getarg_tests)
static void ResetArgs(const std::string& strArg)
{
std::vector<std::string> vecArg;
- boost::split(vecArg, strArg, boost::is_space(), boost::token_compress_on);
+ if (strArg.size())
+ boost::split(vecArg, strArg, boost::is_space(), boost::token_compress_on);
// Insert dummy executable name:
vecArg.insert(vecArg.begin(), "testbitcoin");