summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-08-01 16:32:55 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-08-02 07:01:33 +0000
commit2d61f0a269e083b10cd560028f64940938ab7afd (patch)
treed08b6fa66e62a8f43a1695b8fef491e23219137a
parentc020786f57b8f5f3a450a8b77f850afe7c0d3f25 (diff)
Work around MSVC2017 optimizer bug when printing a page usind Pdfium
On Windows MSVC2017 32bit release builds of WebEngine, printing to a QPrinter instance only printed partial page content. This ended up being a compiler / optimizer bug triggered in the FX_atof function in src/3rdparty/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp which resulted in returning float numbers without any digits past the decimal point. Because of that, many size / offset calcuations were wrong. The fix is to remove a redundant 'strc[cc] == "."' check, which is implcitly present in a previous if condition. This in turn stops the compiler from generating incorrect code, and thus parsing the digits past the decimal point. Task-number: QTBUG-69639 Change-Id: I7908318b6e7ca58e81d951af784ed8dcd901e12c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--chromium/third_party/pdfium/core/fxcrt/fx_string.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp b/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp
index 13eb3a5bdd4..cc180c54593 100644
--- a/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp
+++ b/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp
@@ -167,7 +167,7 @@ float FX_atof(const ByteStringView& strc) {
cc++;
}
int scale = 0;
- if (cc < len && strc[cc] == '.') {
+ if (cc < len) {
cc++;
while (cc < len) {
value += FractionalScale(scale, FXSYS_DecimalCharToInt(strc.CharAt(cc)));