summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-11-18 21:53:03 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2016-11-19 21:26:51 (GMT)
commit6c263935cb2bc87d08f284004bec3cabafda727c (patch)
treee6975fec734e9cb7ab4f0a933cba313fb5ac5ad3 /src
parentb242fb2f4fb30a07b4b8f486c4e9329c15683023 (diff)
downloadmxe-6c263935cb2bc87d08f284004bec3cabafda727c.zip
mxe-6c263935cb2bc87d08f284004bec3cabafda727c.tar.gz
mxe-6c263935cb2bc87d08f284004bec3cabafda727c.tar.bz2
qtbase: Fix wrong assert
Fix https://github.com/mxe/mxe/issues/1572
Diffstat (limited to 'src')
-rw-r--r--src/qtbase-1-fixes.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/qtbase-1-fixes.patch b/src/qtbase-1-fixes.patch
index 78494ec..7c4d99a 100644
--- a/src/qtbase-1-fixes.patch
+++ b/src/qtbase-1-fixes.patch
@@ -265,3 +265,36 @@ index 1111111..2222222 100644
}
-
-TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Ulf Hermann <ulf.hermann@qt.io>
+Date: Wed, 24 Aug 2016 11:55:35 +0200
+Subject: [PATCH] QLocale: Fix wrong assert
+
+The endptr from reading the exponent of a 'g' form snprintf result
+should not be past the end of the string we're reading from. It has
+nothing to do with the 'e' sign.
+
+Task-number: QTBUG-54482
+Change-Id: I8bdee917b8d21fdc94c255548ad7e008431a07fa
+Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
+
+See https://github.com/mxe/mxe/issues/1572
+Source: https://codereview.qt-project.org/#/c/168995
+Source: https://github.com/qt/qtbase/commit/de7f281d7ad1bc8e3dc5a54943
+
+Remove this patch when updating to Qt 5.7.1.
+
+diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp
+index 1111111..2222222 100644
+--- a/src/corelib/tools/qlocale_tools.cpp
++++ b/src/corelib/tools/qlocale_tools.cpp
+@@ -224,7 +224,7 @@ void doubleToAscii(double d, QLocaleData::DoubleForm form, int precision, char *
+ const char *endptr;
+ decpt = qstrtoll(target.data() + eSign + 1, &endptr, 10, &ok) + 1;
+ Q_ASSERT(ok);
+- Q_ASSERT(endptr - target.data() <= length - eSign -1);
++ Q_ASSERT(endptr - target.data() <= length);
+ } else {
+ // No 'e' found, so it's the 'f' form. Variants of snprintf generate numbers with
+ // potentially multiple digits before the '.', but without decimal exponent then. So we