diff options
Diffstat (limited to 'src/corelib/tools/qlocale_win.cpp')
-rw-r--r-- | src/corelib/tools/qlocale_win.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp index 885c77c46d..b03866681e 100644 --- a/src/corelib/tools/qlocale_win.cpp +++ b/src/corelib/tools/qlocale_win.cpp @@ -348,6 +348,9 @@ QVariant QSystemLocalePrivate::dateTimeFormat(QLocale::FormatType type) QVariant QSystemLocalePrivate::dayName(int day, QLocale::FormatType type) { + if (day < 1 || day > 7) + return QString(); + static const LCTYPE short_day_map[] = { LOCALE_SABBREVDAYNAME1, LOCALE_SABBREVDAYNAME2, LOCALE_SABBREVDAYNAME3, LOCALE_SABBREVDAYNAME4, LOCALE_SABBREVDAYNAME5, |