diff options
author | Lorn Potter <lorn.potter@gmail.com> | 2019-06-06 16:47:18 +1000 |
---|---|---|
committer | Lorn Potter <lorn.potter@gmail.com> | 2019-07-29 09:25:48 +1000 |
commit | 570fb55a334d77959ed158fc55ac66814bd33f15 (patch) | |
tree | adda495983775a5986994fb4a6158553673b7e26 /src | |
parent | 28af6e97e5fe7f844bc85df7af22ce8b7414f5a6 (diff) |
wasm: fix wide character data download
Need to pass correct buffer size
Change-Id: I19cb65114f49decc225cd807d59f1f08ad6b70c9
Fixes: QTBUG-76212
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qnetworkreplywasmimpl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/access/qnetworkreplywasmimpl.cpp b/src/network/access/qnetworkreplywasmimpl.cpp index ee91dc20b3..53784407d8 100644 --- a/src/network/access/qnetworkreplywasmimpl.cpp +++ b/src/network/access/qnetworkreplywasmimpl.cpp @@ -135,8 +135,10 @@ static void q_loadCallback(val event) if (readyState == 4) { // done reply->setReplyAttributes(xhr["data-handler"].as<quintptr>(), status, statusText); - if (!responseString.isEmpty()) - reply->dataReceived(responseString.toUtf8(), responseString.size()); + if (!responseString.isEmpty()) { + QByteArray responseStringArray = responseString.toUtf8(); + reply->dataReceived(responseStringArray, responseStringArray.size()); + } } } if (status >= 400 && !statusText.isEmpty()) |