Permalink
Browse files

Fix issues with passing an array out of a Web Worker.

  • Loading branch information...
nmrugg committed Sep 21, 2013
1 parent 5cf81d4 commit ca522c00d0f9c7444134252095dec69efe4890ee
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/lzma_worker.js
View
@@ -3758,7 +3758,8 @@ var LZMA = (function () {
postMessage({
action: action_decompress,
callback_num: callback_num,
- result: res
+ /// If the result is an array of integers (because it is binary), we need to use slice to make a copy of the data before it is returned from the Web Worker.
+ result: (typeof res !== "string" ? res.slice(0) : res)
});
}
}

0 comments on commit ca522c0

Please sign in to comment.