sal/cppunittester/cppunittester.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 0c018784020653a864d373162287272c82161170 Author: Markus Mohrhard <[email protected]> Date: Tue Jan 26 17:25:41 2016 +0100 fix the new CPPUNIT_TEST_NAME code Change-Id: I45260555778a733a8c8ba9e39e9ffcce0c9ab78d Reviewed-on: https://gerrit.libreoffice.org/21818 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index fb9f85f..22af500 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -180,7 +180,11 @@ struct test_name_compare bool operator()(const std::string& rCmp) { - size_t nEndPos = maName.find(rCmp) + rCmp.size(); + size_t nPos = maName.find(rCmp); + if (nPos == std::string::npos) + return false; + + size_t nEndPos = nPos + rCmp.size(); return nEndPos == maName.size(); } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
