summaryrefslogtreecommitdiff
path: root/unodevtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-17 17:00:13 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-18 18:03:24 +0200
commitb35a1ee2aa85d42a749c4380feb252dc4c1e143c (patch)
treed93022249d668e69cbe5ba17cc7353e8f755a06d /unodevtools
parentf8c56ecafb87754116bc5a2e37b65b92e1b59514 (diff)
cid#1607362 Overflowed constant
and cid#1607419 Overflowed constant cid#1608605 Overflowed constant Change-Id: Ia63cc771021d8a8031c62582a2fa6a68dc214f08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173614 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'unodevtools')
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index 639438799d48..49a86e87d866 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -252,7 +252,8 @@ static void printConstructor(
rtl::Reference< unoidl::Entity > const & entity, std::u16string_view name,
std::vector< OUString > const & arguments)
{
- o << "public " << OUString(name.substr(name.rfind('.') + 1)) << '(';
+ std::u16string_view::size_type pos = name.rfind('.');
+ o << "public " << OUString(name.substr((pos != std::u16string_view::npos) ? pos + 1 : 0)) << '(';
printConstructorParameters(
o, options, manager, sort, entity, name, arguments);
o << ");\n";