cid#1607242 Overflowed return value
Change-Id: I9efb14bf8395168043e8b3dbe94e7eb84577a175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174894 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
9c7cf67e9c
commit
3aa81e4735
1 changed files with 5 additions and 1 deletions
|
@ -1572,7 +1572,11 @@ sal_Int16 VCLXListBox::getSelectedItemPos()
|
|||
{
|
||||
SolarMutexGuard aGuard;
|
||||
VclPtr< ListBox > pBox = GetAs< ListBox >();
|
||||
return pBox ? pBox->GetSelectedEntryPos() : 0;
|
||||
if (!pBox)
|
||||
return 0;
|
||||
sal_Int32 nPos = pBox->GetSelectedEntryPos();
|
||||
assert(nPos <= SAL_MAX_INT16);
|
||||
return nPos;
|
||||
}
|
||||
|
||||
css::uno::Sequence<sal_Int16> VCLXListBox::getSelectedItemsPos()
|
||||
|
|
Loading…
Reference in a new issue