From b289d5f5cbd9d138832bb8871543763e728c8135 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 17 Sep 2024 10:15:54 +0100 Subject: cid#1608561 Overflowed constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3115263da1c76f635d544e41c3cf96e068b34324 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173543 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- codemaker/source/cppumaker/dumputils.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'codemaker/source') diff --git a/codemaker/source/cppumaker/dumputils.cxx b/codemaker/source/cppumaker/dumputils.cxx index 2a3e809e70f3..37e3ce629862 100644 --- a/codemaker/source/cppumaker/dumputils.cxx +++ b/codemaker/source/cppumaker/dumputils.cxx @@ -71,7 +71,8 @@ bool dumpNamespaceClose( } void dumpTypeIdentifier(FileStream & out, std::u16string_view entityName) { - out << entityName.substr(entityName.rfind('.') + 1); + std::u16string_view::size_type pos = entityName.rfind('.'); + out << entityName.substr((pos != std::u16string_view::npos) ? pos + 1 : 0); } } -- cgit