summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale_win.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-21 17:57:54 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-21 17:57:54 +0100
commit46791c08e17740418cc701b8862a980c0f711b87 (patch)
treebedba63fc48b80c2a2df54ea91c3f35398953aac /src/corelib/tools/qlocale_win.cpp
parentb8a38a6737acd670d92197ca5b009590d9fd8a9c (diff)
parent9033977d3971db5352a2bb51052a723a2ac57a8f (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/tools/qlocale_win.cpp')
-rw-r--r--src/corelib/tools/qlocale_win.cpp3
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,