Skip to content

Commit a94496f

Browse files
committed
tests: don't split an empty string
1 parent 00522cd commit a94496f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/getarg_tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ BOOST_AUTO_TEST_SUITE(getarg_tests)
1616
static void ResetArgs(const std::string& strArg)
1717
{
1818
std::vector<std::string> vecArg;
19-
boost::split(vecArg, strArg, boost::is_space(), boost::token_compress_on);
19+
if (strArg.size())
20+
boost::split(vecArg, strArg, boost::is_space(), boost::token_compress_on);
2021

2122
// Insert dummy executable name:
2223
vecArg.insert(vecArg.begin(), "testbitcoin");

0 commit comments

Comments
 (0)