commit e6d7ae8e2f7538b7c0e6a9c2e82e5a1b52f5632c
parent 31ed9bd70b9c1e89abd6f7be7413c5fdb03fe804
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 26 Jan 2017 22:32:33 -0500
Fix truncated reports with multi-byte characters
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/zotero-protocol-handler.js b/components/zotero-protocol-handler.js
@@ -1220,7 +1220,7 @@ AsyncChannel.prototype = {
.createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
converter.charset = "UTF-8";
let inputStream = converter.convertToInputStream(data);
- listenerWrapper.onDataAvailable(this, context, inputStream, 0, data.length);
+ listenerWrapper.onDataAvailable(this, context, inputStream, 0, inputStream.available());
listenerWrapper.onStopRequest(this, context, this.status);
}