cid#1606864 Overflowed constant

Change-Id: I08beb9bd76065ea846171e07fbf6e427ada37360
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173667
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Caolán McNamara 2024-09-18 17:42:18 +01:00
parent 2f4c8f896f
commit 795940e4ac

View file

@ -356,7 +356,8 @@ double get_time(timeval* time)
OString generateTestName(std::u16string_view rPath)
{
size_t nPathSep = rPath.rfind('/');
std::u16string_view aTestName = rPath.substr(nPathSep+1);
size_t nAfterPathSep = (nPathSep != std::string_view::npos) ? (nPathSep + 1) : 0;
std::u16string_view aTestName = rPath.substr(nAfterPathSep);
return OUStringToOString(aTestName, RTL_TEXTENCODING_UTF8);
}