scripting/source/stringresource/stringresource.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 07a01c26a6c86ab67a42ecb29a63a18518802dba
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Sep 1 12:39:31 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Sep 2 21:14:37 2024 +0200

    cid#1608218 silence Overflowed return value
    
    Change-Id: I42f536c0c48b750ba7f8db0784bf5f525af99c7b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172772
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/scripting/source/stringresource/stringresource.cxx 
b/scripting/source/stringresource/stringresource.cxx
index 1ab21c569382..3e06668ec7d0 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1848,11 +1848,12 @@ bool 
StringResourcePersistenceImpl::implReadPropertiesFile
     return true;
 }
 
-
 static sal_Unicode getHexCharForDigit( sal_uInt16 nDigitVal )
 {
-    sal_Unicode cRet = ( nDigitVal < 10 ) ? ('0' + nDigitVal) : ('a' + 
(nDigitVal-10));
-    return cRet;
+    if (nDigitVal < 10)
+        return static_cast<sal_Unicode>('0' + nDigitVal);
+    else
+        return static_cast<sal_Unicode>('a' + (nDigitVal-10));
 }
 
 static void implWriteCharToBuffer( OUStringBuffer& aBuf, sal_Unicode cu, bool 
bKey )

Reply via email to