cid#1607163 Overflowed return value

Change-Id: I403a2c5bb55e3a80d3bf99302b262aa507812d68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174895
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin
2024-10-14 16:58:51 +02:00
parent 274781b308
commit 6402a656cd
+1
View File
@@ -211,6 +211,7 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
{
short nWeek;
short n1WDay = static_cast<short>(Date( 1, 1, GetYear() ).GetDayOfWeek());
assert(n1WDay >= 0);
short nDayOfYear = static_cast<short>(GetDayOfYear());
// weekdays start at 0, thus decrement one