diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-02-04 01:00:59 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-02-04 10:44:00 +0100 |
commit | 97417e8f2896bfbe1d9e9a703ddba980983d1442 (patch) | |
tree | ecee79f9b126bc695904e74000c0775d1ef34646 /src/plugins/platforms/wasm/qwasmstring.cpp | |
parent | 02eb9df851093f11872c828869226903c81f1b60 (diff) | |
parent | 056230cc9c3309823a93df0e34c92affb29df9e4 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
.qmake.conf
examples/widgets/widgets/imageviewer/imageviewer.cpp
src/corelib/text/qchar.cpp
src/corelib/time/qdatetime.cpp
Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmstring.cpp')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmstring.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/wasm/qwasmstring.cpp b/src/plugins/platforms/wasm/qwasmstring.cpp index 05b571c459..b1be405eeb 100644 --- a/src/plugins/platforms/wasm/qwasmstring.cpp +++ b/src/plugins/platforms/wasm/qwasmstring.cpp @@ -52,9 +52,10 @@ QString QWasmString::toQString(const val &v) val::global("Module")["stringToUTF16"]); static const val length("length"); - result.resize(v[length].as<int>()); + int len = v[length].as<int>(); + result.resize(len); auto ptr = quintptr(result.utf16()); - stringToUTF16(v, val(ptr)); + stringToUTF16(v, val(ptr), val((len + 1) * 2)); return result; } |